开发者

load application.ini

We use:

- Zend_Controller_Front

- no Zend_Application

- no Zend_Application_Bootstrap

We want to use application.ini.

require_once("Zend/Controller/Front.php");

class Forum4Php_Bootstrap {

    protected $_dispatcher;

    public function  __construct()开发者_如何学运维 {
        $this->_dispatcher = Zend_Controller_Front::getInstance();
    }

    public function runApp() {
        $this->_dispatcher->addModuleDirectory(FORUM_FOR_PHP_ROOT_DIR."/application/modules");
        $this->_dispatcher->dispatch();
    }
}

Is there a way?


You can use parse_ini_file as karim79 suggested or pass the path to your .ini file to a Zend_Config_Ini object:

$config = new Zend_Config_Ini('/path/to/application.ini', 'development');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜