开发者

Error loading Model in Codeigniter 1.7.3

Hello and thanks for reading,

I have a problem, I ha开发者_如何学JAVAve a controller "Articles" that is supposed to load Model called "Articles", only problem is I get a 500 server error when I try to load that model?

Any suggestions?

Thanks in advance,

H


I found the solution, it turns out that you cannot load a Model with the same name as the controller in which it is being called, it really confuses codeigniter.

My controller class name was "Articles" and my model name was "Articles". When I changed the model class name to "Articles_model" instead it worked fine. I just thought I would share this in case any one else has this problem too.

Regards,

H

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜