Welcome Guest, Not a member yet? Register   Sign In
MY_Model not found

i moved my site from windows machine to cent os
and i have an error "Unable to locate the model you have specified: my_model"
MY_Model.php is in application/models, . i tried to put it in application/core but still the same..

your my_model file should stay in your application/core folder. But that sounds to me like a case sensitive problem. Check the name of your files and all that to see if you didn't make any mistakes.

Name of your file: /core/MY_Model.php
Name of your class: MY_Model

When i do this it is not working on both machines..
I get the same error.

Which version of CI are you using right now?


Found It!
I removed it from the autoload.php Smile

You are saying that you renamed your class from "my_model" to "MY_Model" and now it is not working, also, the file name stayed the same, is that so?

add a echo 'test'; before the class declaration to check the file is loaded.

Ok, nice.

Everything was ok but was in the /models directory
and i removed it from the autoload

Whenever you extend CI with MY_, you still just load the original parent and CI will autoload MY_whatever if it exists.

Theme © iAndrew 2016 - Forum software by © MyBB