我是 zend 框架的新手。
我用 zend 工具创建了一个 zend 项目,它的工作原理。然后我尝试创建一个模块,但是当我尝试使用浏览器访问它时,出现错误。
我的步骤:
$ sudo zf create project mystore
- 将Zend 库放在库中
测试:http://localhost/mystore/public/ (工作)
添加模块存储(不工作)
$ sudo zf create module store
添加到模块的application.ini路径
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
资源.modules = ""
测试1:http://localhost/mystore/public/store/
test2:http://localhost/mystore/public/store/public/
测试3 :http://localhost/mystore/public/modules/store/public/
测试1+2+3 结果:
An error occurred
Page not found
Exception information:
Message: Invalid controller specified (index.php)
Stack trace:
#0 /var/www/mystore/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /var/www/mystore/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#2 /var/www/mystore/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#3 /var/www/mystore/public/index.php(25): Zend_Application->run()
#4 {main}
Request Parameters:
array (
'module' => 'store',
'controller' => 'index.php',
'action' => 'index',
)
谢谢,
约瑟夫