I don't understand why, but seems that the code doesn't find the model created.
This is my index.php file structure:
<?php
require_once("class/settings.php");
$this->load->model('impostazioni_model');
$this->impostazioni_model->load_colours();
?>
and this is the model impostazioni
, settings.php
class
<?php if ( ! defined('BASEPATH')) exit('Esecuzione diretta dello script non consentita.');
require_once("class/config.php");
class Impostazioni_Model extends CI_Model
{
public function __construct()
{
parent::__construct();
}
public function load_colours()
{
echo "example";
}
}
?>
the config.php
contains the details of the connection, is simple a definition of the connection paramters like host, user, password and database.
What is wrong in my code?