I'm working on a calendar planning provided by [easyappointments][1]
but now I'm stuck on this error by yesterday. In the main page users.php
I've added the following:
<?php
require_once("application/models/impostazioni_model.php");
$this->load->model('impostazioni_model');
$this->impostazioni_model->load_colours();
?>
the require_once
find correctly the file impostazioni_model.php
but when I enter in the page users.php
I see this error:
Fatal error: Call to a member function load_colours() on a non-object
on this line: $this->impostazioni_model->load_colours();
in the class impostazioni_model.php
I've this content:
<?php if ( ! defined('BASEPATH')) exit('Direct execution not allowed.');
class Impostazioni_Model extends CI_Model
{
public function __construct()
{
parent::__construct();
}
public function load_colours()
{
echo "print";
}
}
?>
I've followed the codeigniter
documentation, in particular the class model must be in capital letter so I don't know what I'm wrong. Someone could help me out?