![]() |
how to load library in viewer page? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: how to load library in viewer page? (/showthread.php?tid=28658) |
how to load library in viewer page? - El Forum - 03-17-2010 [eluser]cpliu903[/eluser] Undefined property: CI_Loader:: $mylib test_view.php $this->load->library('mylib'); $this->mylib->getData(1); how to load library in viewer page? - El Forum - 03-18-2010 [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'); |