![]() |
Unable to locate model file.. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Unable to locate model file.. (/showthread.php?tid=6960) |
Unable to locate model file.. - El Forum - 03-18-2008 [eluser]nikefido[/eluser] I have searched this but didn't get a good answer (or at least I seem to be doing it correctly). The error: "Unable to locate the model you have specified: editinfo_model" - Why is it all lowercase? (it's not supposed to be) I did a search where editInfo_model is seen and it all shows up as the correct "editInfo_model". More info: file name (within the models folder): editInfo_model.php Code: class EditInfo_model extends Model { Code: $this->load->model('editInfo_model'); I have migrated from a Windows to a Linux server. Apparently there is capitalization problem, but i've searched and not come up with a different use of capitalization. w.t.f. mate? Unable to locate model file.. - El Forum - 03-18-2008 [eluser]nikefido[/eluser] I made a new controller as a test, this is ALL that's on it: Code: <?php Unable to locate model file.. - El Forum - 03-18-2008 [eluser]nikefido[/eluser] I fixed it, but all i did was make the model "editinfo" rather than "editInfo" ...sigh. whatever Unable to locate model file.. - El Forum - 03-19-2008 [eluser]Glen Swinfield[/eluser] If you look, in Loader.php you will see this: $model = strtolower($model); // then looks for model file. Model 'files' are are all searched for in lower case - Linux is case sensitive, Windows is not. So make sure your filename is lowercase. Also the manual says: "Where Model_name is the name of your class. Class names must have the first letter capitalized with the rest of the name lowercase. Make sure your class extends the base Model class. The file name will be a lower case version of your class name." That's your problem. Unable to locate model file.. - El Forum - 03-19-2008 [eluser]nikefido[/eluser] Ah, ic - I read that but I only caught the "first letter capitalized" in the class name. Thanks for the clarification! Unable to locate model file.. - El Forum - 03-26-2008 [eluser]skrobma[/eluser] I had the same problem, I migrated my code to UNIX from windows (WAMP) and I received the same error. My model name began with a capital letter, changed the case and everything works great. This thread saved me much frustration. :-) Thanks, great forum!!! |