Jie*_*eng 2 zend-framework module zend-tool
我曾经zend_tool设置一个项目,然后create module blog使用索引控制器等,但我想zend_tool的默认配置设置不适用于模块所以我编辑它
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.moduleDirectoryControllerName = "controllers"
Run Code Online (Sandbox Code Playgroud)
我想这些都是模块所必需的?还我感动的文件夹,controllers, models, views进入modules/文件夹
但是当我尝试去http://servername哪个shld加载默认模块的索引控制器和动作时,我得到一个空白屏幕.即使我试图去http://servername/nonexistentpage它也显示一个空白的屏幕而不是404
你没有动controllers,models和views.这些是default模块的目录,不在modules目录中(默认情况下).
所有你需要的是:
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] =
Run Code Online (Sandbox Code Playgroud)
如果您想将默认module在modules太,你必须建立这样的应用程序:
; Default Application Resource Namespace
appnamespace = "YourPrefix"
; FrontController Resource Settings
resources.frontController.defaultController = "index"
resources.frontController.defaultAction = "index"
resources.frontController.defaultModule = "modulename"
resources.frontController.prefixDefaultModule = true
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.params.displayExceptions = 1
Run Code Online (Sandbox Code Playgroud)
您没有看到任何内容的原因是应用程序抛出错误,这些错误由于您的配置而未显示.试试这些设置:
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1
Run Code Online (Sandbox Code Playgroud)
确保你有SetEnv APPICATION_ENV development你.htaccess
将Zend Framework升级到最新版本.最新的Zend Tool生成/ docs目录README.txt,其中描述了如何设置虚拟主机.
希望这可以帮助 :)
并且...欢迎来到SO!
| 归档时间: |
|
| 查看次数: |
4690 次 |
| 最近记录: |