3
我是Zend框架的新手。我在Ubuntu 12.04中使用Zend 1.12框架。 我已经安装了zf工具,它工作正常。我创建使用控制器:它创造了控制器在我的控制器文件夹,并查看相应目录中zend控制器 - 页面未找到
zf create controller test
。
但问题是,当我使用这个网址:
http://localhost/zftest/public/index/index
,效果不错,打开的Zend的默认视图。
但是当我尝试打开自定义控制器:
http://localhost/zftest/public/test
它给了我一个错误:
Not Found
The requested URL /zftest/public/test was not found on this server.
Apache/2.2.22 (Ubuntu) Server at localhost Port 80
这是帮我配置的Zend链接:zend configuration
Rudra,因为你的默认页面工作正常,所以测试页面也应该工作只要尝试添加动作在URL像http:// localhost/zftest/public/test/add –
嗨kuldeep,这是奇怪的问题,我是面对,我无法打开任何其他控制器,exept索引控制器。它给我错误404没有找到。 – Rudra
我认为你需要为url添加动作,Zend可能无法通过url中的控制器工作。所以模式必须是http:// localhost/zftest/public/[controller]/[action]。直到你在配置中设置路由URL,这将是以后在学习过程中的主题 –