简体   繁体   中英

Using more than one ini file with Zend Framework

When starting the application into index.php.

$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);

Is there any way to use more than one ".ini" file within the initialization and also not doing any bootstrap action?

I inserted this code in my index.php and it seems to work.

require_once 'Zend/Config/Ini.php';

$config = new Zend_Config_Ini (APPLICATION_PATH . '/configs/application.ini', APPLICATION_ENV, array ('allowModifications' => true));
$config->merge (new Zend_Config_Ini (APPLICATION_PATH . '/configs/channels.ini'));

$application = new Zend_Application(
        APPLICATION_ENV,
        $config
);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM