【发布时间】:2014-09-17 22:08:21
【问题描述】:
我已经在 Linux 机器上设置了 CodeIgniter 的本地副本和另一个副本。使用我的应用程序安装两个副本后,本地副本运行正常,但 linux 版本显示以下错误代码:
Unable to locate the model you have specified: User_model
我整天都在寻找这个问题的答案。我试图更改模型名称、文件名以及我能想到的所有内容的拼写。我可能缺少什么会显示该错误?
谢谢大家
这是我的代码的副本:
(user_model.php)
<?php
class User_model extends CI_Model {
public function __construct(){
parent::__construct();
}
function runTest(){
return "Testing";
}
}
?>
(welcome.php)
class Welcome extends CI_Controller {
public function __construct(){
parent::__construct();
}
public function index()
{
$this->load->model('User_Model');
$data['testing'] = $this->user1234->runTest();
$this->load->view('welcome_message', $data);
}
}
【问题讨论】:
-
你能看看这个帖子stackoverflow.com/a/8077427/4031969吗?
标签: php codeigniter web-applications