如何更改默认模块的目录。我使用Zend框架模块目录结构:更改默认模块的目录
modules
default
controllers
IndexController.php
etc
other-module
但我怎么能更改默认模块目录?我希望它被称为Api。因此,我将有:
modules
Api
controllers
IndexController.php
other-module
我想要的URI保持不变如此:
http://localhost
将路由到模块/原料药/控制器/ IndexController.php和运行的indexAction。
这是我在引导
protected function _initFrontController()
{
$front = Zend_Controller_Front::getInstance();
$front->addModuleDirectory(APPLICATION_PATH.'/modules');
return $front;
}
我不确定,但在你的apllication.ini'resources.frontController.moduleDirectory = APPLICATION_PATH“/ modules/api” – Rikesh 2012-01-31 11:15:26