[eluser]Apidcloud[/eluser]
Hello everyone,
I've been trying to load a model for like 3 or 4 hours but I always get this error:
Quote:Fatal error: Class 'Site_model' not found in pathFromXamppProjectFolder\system\core\Loader.php on line 303
The model I'm trying to load is as follows (I believe that the constructor isn't needed):
Code:
<? php
class Site_model extends CI_Model {
function __construct()
{
parent::__construct();
}
// more functions
}
The filename is
site_model.php and it is placed inside
models folder
In order to actually load it from my controller, I've tried the following - which raises the error mentioned above:
Code:
$this->load->model('site_model');
In case I'm using something deprecated inside my autoload file, I've just changed the following:
Code:
$autoload['libraries'] = array('database');
$autoload['helper'] = array('url', 'form');
It could, somehow, be related to the fact that I am not extending CI_Model into a new class placed inside core folder, which I'd then use to extend the model I really wanna use. Since I'm not entirely sure why it should, or not, go that way, I've decided to create a topic explaining the situation.
Thanks