[eluser]CMCDragonkai[/eluser]
I have base_library loading test_library. And I am trying to access the functions in test_library from base_library.
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Base_library{
public $CI;
public function __construct(){
if(!isset($this->CI)){
$this->CI =& get_instance();
}
$this->CI->load->library('test_library');
$this->test_library->lol();
}
}
test_library:
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Test_library extends Base_library{
public function __construct(){
parent::__construct();
}
public function lol(){
echo 'lol';
}
}
The "$this->test_library->lol();" doesn't work. There is an error about it being a non object.
I've tried $test_library->lol(), it also doesn't work.