Welcome Guest, Not a member yet? Register   Sign In
accessing config variables from helpers or library
#4

[eluser]Jeremy Gimbel - Conflux Group[/eluser]
And further, if you're using a library, instead of a controller or model, you won't have direct access to the CodeIgniter instance.

You'll have to use code like this, instead of the standard $this->config->item(...);

Code:
$CI =& get_instance();

$CI->config->item('base_url');


Messages In This Thread
accessing config variables from helpers or library - by El Forum - 11-13-2009, 06:39 PM
accessing config variables from helpers or library - by El Forum - 11-29-2009, 07:09 PM
accessing config variables from helpers or library - by El Forum - 11-30-2009, 03:07 AM
accessing config variables from helpers or library - by El Forum - 11-30-2009, 01:48 PM
accessing config variables from helpers or library - by El Forum - 11-30-2009, 02:04 PM
accessing config variables from helpers or library - by El Forum - 11-30-2009, 02:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB