Welcome Guest, Not a member yet? Register   Sign In
how to load library in viewer page?
#1

[eluser]cpliu903[/eluser]
Undefined property: CI_Loader:: $mylib

test_view.php
$this->load->library('mylib');
$this->mylib->getData(1);
#2

[eluser]Maglok[/eluser]
You should really not load libraries in your view, but use the controller for it.

That said if you are adament you need to do a get_instance on the CI object and use it kinda like this: $this->CI->load->library('mylib');




Theme © iAndrew 2016 - Forum software by © MyBB