on-internet
← Community

Using multiple libraries in Codeigniter

Stack Overflow ·

I'm trying to load multiple libraries in CI but I'm getting an error. Here is my controller function index() { $this->load->library('materials_library/File_Manager'); $this->load->library('materials_library/Layout'); $data = array(); // Send content to template $this->layout->view('materials_library/file_manager', $data, 'ml_cms'); } The error says view is an undefined property. If I comment out the first load->library, I don't get an error. How do I load multiple libraries in CI? EDIT: class File_manager { private $CI; public function __construct() { $this->CI =& get_instance(); } }

Comments

Sign in or sign up to comment and upvote.

No comments yet.