Model Loading problem |
[eluser]Xobb[/eluser]
Hello, I've got the following problem with the code: File: system/application/controllers/article.php Code: class Article extends Controller File: system/application/models/article.php Code: class Articlemodel extends Model { The error: Code: A PHP Error was encountered I've installed FreakAuth and nothing else. Thank you for help in advance. Ps.: Please add the information about loading models to: Loader Manual
[eluser]jabbett[/eluser]
At first glance, I noticed that your model's filename should be set differently, per the User Guide: "The file name will be a lower case version of your class name." If your model class name is Articlemodel, your filename should be articlemodel.php, not article.php. But considering you've got a library loader error, I'd start by checking your FreakAuth installation and taking up the problem with them.
[eluser]Eric Barnes[/eluser]
Also I see this: Code: class Articlemodel extends Model { Which should be: Code: class Articlemodel extends Model { and: Code: $this->load->model('article', 'art'); Should be: Code: $this->load->model('articlemodel', 'art');
[eluser]Xobb[/eluser]
thank you, guys. Really, I had to load this: Code: $this->load->model('articlemodel', 'art'); |
Welcome Guest, Not a member yet? Register Sign In |