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?
您可以按照karim79的建议使用parse_ini_file
,也可以将.ini文件的路径传递给Zend_Config_Ini
对象:
$config = new Zend_Config_Ini('/path/to/application.ini', 'development');
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.