CodeIgniter Forums
Core classes in libraries/helpers - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Core classes in libraries/helpers (/showthread.php?tid=14543)



Core classes in libraries/helpers - El Forum - 01-06-2009

[eluser]ixxalnxxi[/eluser]
Is it possible to use core classes inside of libraries and helpers? If so, how would I go about doing that.


Core classes in libraries/helpers - El Forum - 01-06-2009

[eluser]thinkigniter[/eluser]
Maybe this will help clear things up?

In your helper or library...
Code:
$CI =& get_instance();

$CI->load->helper('url');
$CI->load->library('session');
$CI->config->item('base_url');
etc. etc.

read this for a more info

Hope this helps


Core classes in libraries/helpers - El Forum - 01-06-2009

[eluser]ixxalnxxi[/eluser]
That was exactly it, thanks.