Welcome Guest, Not a member yet? Register   Sign In
problem with loading model - please help
#1

[eluser]Zion.b.y[/eluser]
hello all,

i have been working at my home on somthing and everything was working fine,
when i moved my project (all the sources files) to other pc
i am getting the next error when i try to load my site

db->query($sql); return $query->result(); } }
Fatal error: Class 'Login_model' not found in C:\wamp\www\system\libraries\Loader.php on line 184


for some reason the error is in the line
$this->load->model('login_model');

the controller does not want to load the model

the whole constractor looks like that:

function login_handler()
{
parent::Controller();
$this->load->database();
$this->load->model('login_model');
$this->load->helper('url');
session_start();
}


please help,

thanks,
Zion
#2

[eluser]tzi0[/eluser]
check your model class name - first letter must be in upper case and check your login_model.php for existing
#3

[eluser]Zion.b.y[/eluser]
checked.
is the filename also have to be with a Capital letter?

(still doesnt work Sad )
#4

[eluser]tzi0[/eluser]
No. btw where is your login_model located?
#5

[eluser]gyo[/eluser]
I suggest you to give a deeper look at your code and the user guide.
#6

[eluser]cahva[/eluser]
login_model should be named models/login_model.php and the class should be named:
Code:
class Login_model extends Model {
...

Loading model should be in lowercase as you have it now.




Theme © iAndrew 2016 - Forum software by © MyBB