在apalication/core里面建立一个MY_Controller.php
class MY_Controller extends CI_Controller
{
function __construct()
{
parent::__construct();
}
}
接着
class Main_Controller extends MY_Controller{
function __construct(){
parent::__construct();
}
}
然后在application/controllers下面
class Home extends Main_Controller{
public function index(){
$this->load->view('include/header');
$this->load->view('home/home');
$this->load->view('include/footer');
}
提示Fatal error: Class 'Main_Controller' not found in
这是为什么
如果是
class Home extends MY_Controller{
public function index(){
$this->load->view('include/header');
$this->load->view('home/home');
$this->load->view('include/footer');
}
就是正确的,是不是还需要配置什么??