Codeigniter:无法找到您指定的模型 [英] Codeigniter : Unable to locate the model you have specified

查看:175
本文介绍了Codeigniter:无法找到您指定的模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将我的PHP从版本5.2.9升级到5.3.1,并遇到以下与我的codeigniter应用程序:

I have upgraded my PHP from version 5.2.9 to 5.3.1 and have encountered the following with my codeigniter application:

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

Codeigniter版本2.1,带HMVC扩展名
服务器:Centos 5

Codeigniter version 2.1, with HMVC extension Server: Centos 5

模型名称都是小写字母,它也通过调用小写字母加载。一切都在PHP升级之前工作。

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.

推荐答案

如果你使用HMVC,那么你必须提供模块名称

If you are using HMVC, then you have to provide the module name as well.

像这样

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

这篇关于Codeigniter:无法找到您指定的模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆