Unable to locate the model |
[eluser]Crabby[/eluser]
Hi Guys I'm a CodeIgniter newbie and I'm just getting to grips with system at the moment, it looks like a great system. I just have a couple of queries I hoping someone could help me with, firstly I've set up these two files, but when I go to the domain www.mydomain.com/appName/index.php?blog it comes up with this error? Code: An Error Was Encountered Any ideas what could be wrong? Code: //controllers/blog.php Code: //models/blog_model.php Also can you have friendly urls using IIS? Any help would be much appreciated Thanks in advance Crabby
[eluser]Michael Wales[/eluser]
Code: $this->load->model('Blog_model'); The parameter is always the class name.
[eluser]Crabby[/eluser]
wow that was a quick reply thank you very much, do have to have _model in your class name?
[eluser]Michael Wales[/eluser]
No you can name it whatever you want (although if you are on PHP4 there are some reserved names, and of course you can't declare the same class name twice). Me personally, I append _m to my models (user_m, project_m, etc.). |
Welcome Guest, Not a member yet? Register Sign In |