Php Zend Framework-从引导程序中的application.ini访问配置文件值

Php Zend Framework-从引导程序中的application.ini访问配置文件值,php,zend-framework,Php,Zend Framework,我使用的是Zend Framework 1.12,我需要从引导程序的_init函数中访问application.ini中的配置值 通常,我会在控制器内执行以下操作: $frontController = Zend_Controller_Front::getInstance(); $options = new Zend_Config($frontController->getParam('bootstrap')->getOptions(), true); $language = $op

我使用的是Zend Framework 1.12,我需要从引导程序的_init函数中访问application.ini中的配置值

通常,我会在控制器内执行以下操作:

$frontController = Zend_Controller_Front::getInstance();
$options = new Zend_Config($frontController->getParam('bootstrap')->getOptions(), true);
$language = $options->get('interface', false)->language;
但是,在
\u initFunction
中,这不起作用

我尝试过使用
newzend\u配置($this->getOptions(),true)但它不返回任何数据

有什么解决办法吗


谢谢

以下是可能适合您的:

$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', APPLICATION_ENV);
APPLICATION_PATH和APPLICATION_ENV是index.php上定义的常量