问题描述
我正在开发一个新的Symfony2项目,并且正在使用app_dev前控制器查看默认的AcmeDemoBundle页面。
I'm working on a new Symfony2 project, and I'm using the app_dev frontcontroller to view the default AcmeDemoBundle's pages.
对控制器进行更改时,出现异常( NotFoundHttpException:未找到 GET / demo / hello / World的路由
)。如果我使用 php app / console cache:clear
清除缓存,事情将再次恢复正常。但是,据我了解,通过使用app_dev前端控制器,不需要执行此操作。我做错什么了吗?
When I make changes to the controllers, I get an exception (NotFoundHttpException: No route found for "GET /demo/hello/World"
). If I clear the cache using php app/console cache:clear
, things work great again. However, it is my understanding that by using the app_dev front controller, I shouldn't be required to do this. Am I doing something wrong?
Soms系统规格:
使用MAMP的OSX Lion
PHP 5.3.6
Symfony 2.0.1
Soms system specs:OSX Lion using MAMPPHP 5.3.6Symfony 2.0.1
推荐答案
您是否为Web服务器和命令行用户使用其他用户?也许您应该在段落中检查权限。
Are you using different users for webserver and command line user? Maybe you should check for permissions in the Setting up Permissions paragraph.
这篇关于Symfony2开发环境不会自动清除缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!