Welcome Guest, Not a member yet? Register   Sign In
Config vars in helpers
#1

[eluser]Iverson[/eluser]
How can I access variables defined in my config.php file from a helper?
#2

[eluser]Murodese[/eluser]
http://ellislab.com/codeigniter/user-gui...onfig.html
#3

[eluser]Iverson[/eluser]
[quote author="Murodese" date="1226704821"]http://ellislab.com/codeigniter/user-guide/libraries/config.html[/quote]

Sorry, I meant helpers. I had libraries on my mind...lol. Since helpers aren't classes, is this even possible?
#4

[eluser]Murodese[/eluser]
Code:
$CI =& get_instance();
$CI->config->load('item');

No idea if it works in helpers, I would have to assume so.

e; yes, it does.




Theme © iAndrew 2016 - Forum software by © MyBB