0
我有這個文件的結構:CI>自定義基本控制器找不到型號
- 應用
- 控制器
- home.php
- 核心
- MY_Controller.php
- 車型
- users.php
- 控制器
這些是每個文件的代碼:
home.php
class Home extends MY_Controller {
public function __construct() {
parent::__construct();
}
public function index() {
echo "Hello World!";
}
}
MY_Controller.php
class MY_Controller extends CI_Controller {
var $user_model = null;
public function __construct() {
parent::__construct();
$this->user_model = new Users();
}
}
users.php
class Users extends CI_Model {
public function __construct() {
parent::__construct();
}
}
當我加載在瀏覽器上的網頁,我得到這個錯誤:
致命錯誤:類「用戶'未找到第7行的C:\%path%\ application \ core \ MY_Controller.php。
Plea se幫助我使我的自定義基本控制器找到我的模型。謝謝!
備註: 這些情況與我提供的一樣(聽說可能存在大小寫敏感問題)。
編輯: 當我打開日誌文件時,我發現這個。 錯誤 - 2014-02-17 01:02:05 - >嚴重性:8192 - > mysql_pconnect():不推薦使用mysql擴展,將來會被刪除:使用mysqli或PDO代替C:\%path% \ system \ database \ drivers \ mysql \ mysql_driver.php 91