Welcome Guest, Not a member yet? Register   Sign In
custom config error
#1

[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.
#2

[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
#3

[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.




Theme © iAndrew 2016 - Forum software by © MyBB