I've extended CodeIgniter controller by adding MY_Controller.php in Application/Core folder. It works fine, but Now when I add following code on error_404.php
page in Application/errors
, I get error.
Code causing problem:
<?php $ci =& get_instance();?>
<?php $this->ci->load->view('header')?>
Error:
Fatal error: Class 'CI_Controller' not found in path\to\system\core\CodeIgniter.php on line 231
The line 231 of the system\core\CodeIgniter.php
is:
function &get_instance()
{
return CI_Controller::get_instance();
}
How can I fix this so that I can load view in the error_404.php without changing anything in system files.
PS. I'm using latest version.
Thanks.