gpt4 book ai didi

zend-framework - Zend Framework 1.1 模块设置

转载 作者:行者123 更新时间:2023-12-04 04:27:14 24 4
gpt4 key购买 nike

我使用 zend_tool 设置一个项目,然后使用索引 Controller 等 create module blog 但我猜 zend_tool 设置的默认配置不适用于模块,所以我编辑了它

resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.moduleDirectoryControllerName = "controllers"

我猜这些是模块所必需的?我还移动了文件夹,controllers, models, viewsmodules/ 文件夹

但是当我尝试转到 http://servername 时出现空白屏幕,它会加载默认模块的索引 Controller 和操作。即使我尝试访问 http://servername/nonexistentpage,它也会显示空白屏幕而不是 404

最佳答案

您不必移动 Controller 模型 View 。这些是 default 模块的目录,它没有放在 modules 目录中(默认情况下)。

您只需要:

resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] =

如果你也想在 modules 中放置默认的 module,你必须像这样设置应用程序:

; 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

您看不到任何内容的原因是应用程序抛出错误,这些错误因您的配置而未显示。试试这些设置:

phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1

确保您的 .htaccess 中有 SetEnv APPICATION_ENV development

将 Zend Framework 升级到最新版本。最新的 Zend Tool 生成/docs 目录,其中包含 README.txt,其中描述了如何设置虚拟主机。

希望这有帮助:)

还有……欢迎来到 SO!

关于zend-framework - Zend Framework 1.1 模块设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2438728/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com