2010-06-01 136 views
0

我下载了最新版本的Zend框架,增加了一个控制器和I 不能得到它加载。这里是我做过什么:未找到zend框架控制器?

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> 

然后我试图打从浏览器控制器..

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

,我得到的错误:未找到

所请求的网址/ myproject的/公/ myController的/没有被此服务器上找到。

我不知道如何解决这个问题,我有点震惊我在使用Zend Server时遇到问题 。

+0

它会告诉你..“注意:这个命令创建了一个web项目,有关设置VHOST的更多信息,请参阅docs/README” – nuqqsa 2010-06-01 15:45:56

回答

2

Dooh ..其实这个问题很简单..我忘了mod_rewrite ..奇怪的Zend没有默认打开它。