开发者

zend framework controller not found?

I downloaded the latest version of Zend framework, added a controller and I can not get it to load.. Here is what I did:

C:\zend\Apache2\htdocs>zf create project myproject
Creating project at C:/zend/Apache2/htdocs/myproject
Note: This command created a web project, for more information setting up your V
HOST, please see docs/README

C:\zend\Apache2\htdocs>cd myproject

C:\zend\Apache2\htdocs\myproject>zf create controller mycontroller
Note: The canonical controller name that is used with other providers is "Mycont
roller"; not "mycontroller" as supplied
Creating a controller at C:\zend\Apache2\htdocs\myproject/application/controller
s/MycontrollerController.php
Creating an index action method in controller Mycontroller
Creating a view script for the index action method at C:\zend\Apache2\htdocs\myp
roject/application/views/scripts/mycontroller/index.phtml
Creating a controller test file at C:\zend\Apache2\htdocs\myproject/tests/applic
ation/controllers/MycontrollerControllerTest.php
Updating project profile 'C:\zend\Apache2\htdocs\myproject/.zfproject.xml'

C:\zend\Apache2\htdocs\myproject>

Then I tried to hit the controller from t开发者_开发知识库he browser..

http://localhost/myproject/public/mycontroller/

and I get the error: Not Found

The requested URL /myproject/public/mycontroller/ was not found on this server.

I have no idea how to resolve this, and I'm sort of shocked I'm having problems with the Zend Server.


Dooh.. Actually the problem was quite simple.. I forgot the mod_rewrite.. Strange Zend didn't turn it on by default.


Check out the Zend Quick Start. It looks like you don't have the document root setup properly. Your request should have been http://localhost/myproject/mycontroller or http://myproject/mycontroller - if setup properly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜