saving custom config variables |
[eluser]AtlantixMedia[/eluser]
Hello, I need to load several custom config variables in different parts of my application. I'm currently saving them in the $config array as CI suggests and retrieving them when I need to. However, I would prefer to save my config variables this way: Code: $country['us'] = 'United States'; instead of: Code: $config['country'] = array('us' => 'United States', 'uk' => 'United Kingdom'); what would be the proper way to load those variables? a simple include file? thanks in advance
[eluser]ejangi[/eluser]
You could try overwriting the CI_Config class??? The offending line that is forcing you to use $config is on line 80 of the /system/libraries/Config.php file: Code: include(APPPATH.'config/'.$file.EXT);
[eluser]ejangi[/eluser]
Oopps... Accidentally double posted (was trying to edit the previous post, not quote it...) The offending line is in fact: Code: if ( ! isset($config) OR ! is_array($config)) |
Welcome Guest, Not a member yet? Register Sign In |