Zend Framework 1.1 模块设置
我使用 zend_tool
设置一个项目,然后使用索引控制器等创建模块博客
,但我猜 zend_tool 的默认配置设置不适用于模块,所以我编辑了
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.moduleDirectoryControllerName = "controllers"
它这些是模块所必需的吗?我还将文件夹、controllers、models、view
移动到 modules/
文件夹中,
但当我尝试访问 http://servername 时出现空白屏幕
它应该加载默认模块的索引控制器和操作。即使我尝试访问 http://servername/nonexistentpage
它也会显示空白屏幕而不是 404
i used zend_tool
to setup a project then to create module blog
with index controller etc but i guess the default config setup by zend_tool does not work with modules so i edited it
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.moduleDirectoryControllerName = "controllers"
i guess these are required for modules? also i moved the folders, controllers, models, views
into the modules/
folder
but i get a blank screen when i try to go to http://servername
which shld load Default module's index controller and action. even if i try to go http://servername/nonexistentpage
it also shows a blank screen instead of a 404
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不必移动
控制器
、模型
和视图
。这些是
default
模块的目录,它不放置在modules
目录中(默认情况下)。您所需要的只是:
如果您也想将默认的
模块
放入模块
中,则必须像这样设置应用程序:您看不到任何内容的原因是该应用程序会抛出错误,但由于您的配置而不会显示这些错误。尝试以下设置:
确保您的
.htaccess
中有SetEnv APPICATION_ENVdevelopment
将 Zend Framework 升级到最新版本。最新的 Zend Tool 生成 /docs 目录,其中包含
README.txt
,其中描述了如何设置虚拟主机。希望这会有所帮助:)
并且......
欢迎来到SO!
You don't have to move
controllers
,models
, andviews
.These are directories of the
default
module, which is not placed inmodules
directory (by default).All you need is:
If you want to place default
module
in themodules
too, you have to set up the app like this:The reason you do not see anything is that the app throws errors, which are not shown due to your configuration. Try these settings:
Ensure you have
SetEnv APPICATION_ENV development
in your.htaccess
Upgrade Zend Framework to the newest version. Newest Zend Tool generates /docs directory with
README.txt
, which describes how to set up virtual host.Hope this helps :)
And…
Welcome to the SO!