Problem with Model |
[eluser]staar2[/eluser]
I just started testing the CI and i have problems using models: error: An Error Was Encountered Unable to locate the model you have specified: getdata blog.php Code: <?php GetData.php Code: <?php
[eluser]maadmac[/eluser]
[quote author="staar2" date="1195940412"] GetData.php Code: <?php This is just a stab in the dark, since at a glance I don't see anything wrong with your code, but try removing the "public" keyword from your constructor, so that it just reads "function __construct()". I seem to recall CI having problems -- in models especially -- with PHP5 aspects like that, since they built it to be backward compatible with v4...
[eluser]staar2[/eluser]
didn't work i removed public but still dosen't work. I don't see there some code mistakes, so is there possible to change models folder location ? And i use linux.
[eluser]Chris Newton[/eluser]
Shouldn't your model name be Getdata and the filename be set at getdata.php ? I thought CI had a thing for capitalization http://ellislab.com/codeigniter/user-gui...odels.html
[eluser]staar2[/eluser]
It works ! Ty pro i thought there is something wrong with names.
[eluser]maadmac[/eluser]
[quote author="mahuti" date="1195947300"]Shouldn't your model name be Getdata and the filename be set at getdata.php ? I thought CI had a thing for capitalization http://ellislab.com/codeigniter/user-gui...odels.html[/quote] Good call. Have to remember: lowercase file names, upper case constructors. |
Welcome Guest, Not a member yet? Register Sign In |