Welcome Guest, Not a member yet? Register   Sign In
Unable to locate the model
#1

[eluser]A.M.F[/eluser]
so... before i'll start i just want to say: i searched for an answer in the forum, but the answers i found didn't help me.

i have a user model name user_model.php in my application/models folst that looks like that:

Code:
class User extends Model
{
    function User()
    {
        // Call the Model constructor
        parent::Model();
    }

    function register()
    {
        return "dsfs";
    }

}

and i load my model like that:
Code:
$this->load->model('user');

but i keep getting the same error:
Quote:An Error Was Encountered
Unable to locate the model you have specified: user

why? my model file name isn't capitilazed and it is inside the correct folder.
my god i am lost...
#2

[eluser]gtech[/eluser]
user_model.php, hummm I think your filename should be called user.php to match your model class name?
#3

[eluser]A.M.F[/eluser]
omg i broke my head for about a half an hour and u saved me right now just with this little line. thank u!!
#4

[eluser]gtech[/eluser]
lol, no probs sometimes the simplist of errors can be the biggest time wasters.
#5

[eluser]Unknown[/eluser]
+1

I'm returning to CI for this project after spending time with RoR.
So I spent 10 min+ with this same problem

dont you just love having a community ?




Theme © iAndrew 2016 - Forum software by © MyBB