CodeIgniter Forums
custom config error - 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: custom config error (/showthread.php?tid=8512)



custom config error - El Forum - 05-20-2008

[eluser]php-zbatev[/eluser]
Hi,

I made a custom config named it config_mb.php and included it in my autoload.php as $autoload['config'] = array('config_mb'); but i did get this error:

A PHP Error was encountered
Severity: Notice
Message: Undefined variable: config
Filename: config/config_mb.php
Line Number: 3


In my code line 3 is: $config['inc_main'] = $config['base_url'] . 'includes/';

What did I do wrong? please help thanks.


custom config error - El Forum - 05-20-2008

[eluser]php-zbatev[/eluser]
never mind I know why its because I originally thought $config is a global array and that I could append more values to it in another custom config. I removed the $config[’base_url’] and have to make some other workaround... thanks


custom config error - El Forum - 05-20-2008

[eluser]gtech[/eluser]
[strike]it looks like $config['base_url'] is not available in your config_mb file, implying you cant pull config variables from the main config file into your own config file.. I am only guessing..[/strike]
ah beat me to it.