PHP - 未找到Codeigniter CI_Controller

时间:2014-07-01 13:17:59

标签: php codeigniter

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Welcome extends Frontend_Controller{
    public function index(){
        echo "WELCOME CONTROLLER";
    }
}

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require_once APPPATH . 'core/MYC_Controller.php';
class Frontend_Controller extends MYC_Controller{
    public function __construct(){
        echo "<br /> Frontend Controller<br />";
    }
}

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MYC_Controller extends CI_Controller{
    public function __construct(){
        echo "<br />MY Controller<br />";
    }
}

在我的本地服务器上运行正常。但是托管它有问题。

Fatal error: Class 'CI_Controller' not found in 
/home/vol7_5/byethost3.com/b3_15049873/htdocs/application/core/MYC_Controller.php on line 2

我不知道什么是错的。当我在MYC_Controller - CI_Controller中包含它时说:

Fatal error: Cannot redeclare class CI_Controller in 
/home/vol7_5/byethost3.com/b3_15049873/htdocs/system/core/Controller.php on line 30

0 个答案:

没有答案