[eluser]Unknown[/eluser]
Hello people. I am sorry for my bad english. But I have a question. Can I load the library or model from another model?
This error
"A PHP Error was encountered
Severity: Notice
Message: Undefined property: Files_model::$catalog
Filename: models/files_model.php
Line Number: 9
Fatal error: Call to a member function set_cat_type() on a non-object in D:\server\www\lehe\core\application\models\files_model.php on line 9"
appears when I tryed to execute this code:
Code:
class Files_model extends Model
{
function __construct()
{
parent::Model();
$this->load->library('catalog');
$this->catalog->set_cat_type('files');
}
function get_file_list()
{
return $this->catalog->get_catalog_list();
}
. . . . . .
}