Welcome Guest, Not a member yet? Register   Sign In
config->load(‘xxx’, TRUE); in autoload.php ?
#1

[eluser]meglio[/eluser]
Hi.

I have posted the same question to the CodeIgniter discussion, but nobody helps. Maybe this thread is more right place for such questions.

I want to keep config files under different keys of $config variable (the technic of this is descibed in documentation:
http://ellislab.com/codeigniter/user-gui...onfig.html

Manually I can do it so (for application/config/xxx.php):
$this->config->load('xxx', TRUE)

How to do it in autoload.php file?

Thanks,
Anton
#2

[eluser]xwero[/eluser]
It's not possible with the autoload. Loader library snippet
Code:
function _ci_autoloader()
    {
        include_once(APPPATH.'config/autoload'.EXT);

        if ( ! isset($autoload))
        {
            return FALSE;
        }

        // Load any custom config file
        if (count($autoload['config']) > 0)
        {
            $CI =& get_instance();
            foreach ($autoload['config'] as $key => $val)
            {
                $CI->config->load($val);
            }
        }
#3

[eluser]meglio[/eluser]
Thanks, then it seems that it will be good fix for next version to allow this in autoload.php




Theme © iAndrew 2016 - Forum software by © MyBB