Error When Loading View in My_Controller - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Error When Loading View in My_Controller (/showthread.php?tid=45756) |
Error When Loading View in My_Controller - El Forum - 10-04-2011 [eluser]Dr. Seuss[/eluser] I have been trying to implement the solution referenced at: http://stackoverflow.com/questions/4708639/error-when-trying-to-load-view-in-my-controller ...and... http://ellislab.com/forums/viewthread/162002/ Don't know why, but Aptana indicates a syntax error on my line: Code: parent::load->view('common/header_out'); ...which is seconded by the interpreter when I execute: "unexpected T_OBJECT_OPERATOR" Previously I tried using: Code: $this->load->view('common/header_out'); ...which generated the following errors: Quote:Warning: include(application/errors/error_php.php) [function.include]: failed to open stream: No such file or >directory in /home/uom2/www/system/core/Exceptions.php on line 167 Further, I tried using: Code: $CI =& get_instance(); ...which generates precisely the same results as above! Quote:Warning: include(application/errors/error_php.php) [function.include]: failed to open stream: No such file or directory in /home/uom2/www/system/core/Exceptions.php on line 167 I am using CI 2.0. Any help would be appreciated. application/core/Uom_Controller.php Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); controllers/home/home.php Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); obviously the intention is similar to the SO post at the top of this post: I want the $this->render(); ...to be called and render my page header, body, and footer. (My next task is to add the authentication check to this MY_Controller pattern, so I am hoping that whatever solution works for calling views also works on models. Thanks everyone and I really have spent hours trying to find a solution to this before once again turning to this forum. |