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


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:

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

How to do it in autoload.php file?


It's not possible with the autoload. Loader library snippet
function _ci_autoloader()

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

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

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