Here is what i did.
My settings in applications/config/config.php file
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
$config['url_suffix'] = '';
$config['subclass_prefix'] = 'MY_';
Created file MY_Controller.php in application/core
MY_Controller.php file includes:
class MY_Controller extends CI_Controller
{
public function __construct(){
parent::__construct();
}
}
created file Frontend_Controller.php in application/libraries
Frontend_Controller.php file includes
class Frontend_Controller extends MY_Controller
{
public function __construct(){
parent::__construct();
}
}
In last I extended the main contrller class here with Frontend_Controller
my main controller resides in application/controllers/main.php
class Main extends MY_Controller {
public function __construct()
{
parent::__construct();
$this->load->model('PrizeBondSearch_Model');
}
public function index()
{
$PrizeBonds = $this->PrizeBondSearch_Model->ShowAllPBS();
$this->load->view('home', $PrizeBonds);
}
}
Problem:
So here comes the problem, when i extend the main controller class with MY_Controller, it works perfectly fine,
But when i try to extend the main controller with Frontend_Controller class it gives me this below problem
Fatal error: Class 'Frontend_Controller' not found in C:\xampp\htdocs\projects\PrizeBondSearch\application\controllers\main.php on line 3
Any Ideas How to Resolve it?