简体   繁体   English

Codeigniter:无法找到您指定的模型

[英]Codeigniter : Unable to locate the model you have specified

I have upgraded my PHP from version 5.2.9 to 5.3.1 and have encountered the following with my codeigniter application: 我已将PHP从5.2.9升级到5.3.1,并且在我的codeigniter应用程序中遇到了以下问题:

Unable to locate the model you have specified: some_model

Codeigniter version 2.1, with HMVC extension Server: Centos 5 Codeigniter 2.1版,带HMVC扩展服务器:Centos 5

The model names are all in lower case and it is also loaded by calling their lower case letter. 型号名称全部为小写,也可以通过调用小写字母加载。 Everything used to work before the PHP upgrade. 在PHP升级之前,一切都已经过去了。

If you are using HMVC, then you have to provide the module name as well. 如果您使用的是HMVC,那么您还必须提供模块名称。

Like this 像这样

$this -> load -> model('module/model_name');

使第二个参数为TRUE:

$this->load->model('modelname', TRUE);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM