i am trying to create core class in codeigniter.in application/core in create a file with the name of MY_head.php and the code of MY_head.php is
class MY_head extends CI_Controller{
public function __construct(){
parent::__construct();
}
public function load_header(){
//some code here
}
}
Now i am trying to extend this class in my controller practice.php the code is
class Practice extends MY_head{
public function __construct(){
parent::__construct();
}
function index(){
}
}
but when i load practice controller in browser it says Fatal error: Class 'MY_head' not found in. where the problem is? Thanks in advance Note : $config['subclass_prefix'] = 'MY_';