Using multiple libraries in Codeigniter -
i'm trying load multiple libraries in ci i'm getting error. here controller
function index() { $this->load->library('materials_library/file_manager'); $this->load->library('materials_library/layout'); $data = array(); // send content template $this->layout->view('materials_library/file_manager', $data, 'ml_cms'); } the error says view undefined property. if comment out first load->library, don't error. how load multiple libraries in ci?
edit:
class file_manager { private $ci; public function __construct() { $this->ci =& get_instance(); } }
to load multiple put them 1 array:
$this->load->library( array('materials_library/file_manager', 'another/library') );
Comments
Post a Comment