iranwang 发表于 2011-7-21 15:40:47

Unable to locate the model you have specified:*_model 解决方法

今天把一个codeigniter程序部署到linux(centos)下的nginx的时候出现了
Unable to locate the model you have specified:*_model这个问题
在网站找了半天也没解决 值得庆幸的是论坛管理员(CodeIgniter 中国 )给我了解决方案 现在吧解决方法贴出了





Unable to locate the model you have specified

cszp12 发表于 2015-11-12 11:08:15

坑爹的CI 3.0文件名是要强制首字母大写。 如果CI版本是3.0请绕过楼上的官方解说。

leeer 发表于 2016-2-29 15:42:38

排除命名问题后,还是出现这个问题该怎么办呢?

andyzu 发表于 2016-6-28 10:46:14

我也派出了命名问题后,还有这个提示!!!

jeongee 发表于 2011-7-21 15:43:24

其实网站上问这个问题的还是蛮多的

zghkevin 发表于 2011-8-10 12:33:19

我也是这样,解决没有?在本地可以,放服务器nginx下就不行了

zghkevin 发表于 2011-8-10 12:39:09

看来了,谢

NicholasWay 发表于 2011-9-29 10:22:09

多谢楼主分享解决方法

80后 发表于 2012-3-29 13:27:31

{:1_1:}

630088892 发表于 2012-8-2 13:53:14

谢谢了 不错的回答

守望幸福的孩子 发表于 2012-9-17 13:39:21

还真是这个问题,已经解决,不过新问题也挺多的。。。。。

大道达人 发表于 2012-9-17 17:37:47

CI源码中出现Ucfirst的地方,大写就这些地方需要注意
system/core/Loader.php:301:                     $model = ucfirst($model);
system/core/Loader.php:628:                     $library = ucfirst($library).'/'.$library;
system/core/Loader.php:899:             foreach (array(ucfirst($class), strtolower($class)) as $class)
system/core/Loader.php:906:                           $baseclass = BASEPATH.'libraries/'.ucfirst($class).'.php';
system/core/Loader.php:1029:                                    elseif (defined('ENVIRONMENT') AND file_exists($path .'config/'.ENVIR
system/core/Loader.php:1031:                                          include($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($
system/core/Loader.php:1039:                                    elseif (file_exists($path .'config/'.ucfirst(strtolower($class)).'.ph
system/core/Loader.php:1041:                                          include($path .'config/'.ucfirst(strtolower($class)).'.php');
system/libraries/Driver.php:48:         $lib_name = ucfirst(strtolower(str_replace('CI_', '', $this->lib_name)));
system/libraries/Driver.php:60:                                 foreach (array(ucfirst($driver_name), $driver_name) as $class)
system/libraries/Migration.php:168:                           $class = 'Migration_' . ucfirst($match);
system/libraries/Migration.php:207:                     $class = 'Migration_' . ucfirst(strtolower($migration));
页: [1] 2
查看完整版本: Unable to locate the model you have specified:*_model 解决方法