Reputation: 1275
Hello and thanks for reading,
I have a problem, I have 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
Upvotes: 3
Views: 497
Reputation: 1275
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
Upvotes: 2