这个语句一直回车生成代码之后 然后 访问/app_dev.php/hello/ 显示
no route found for get /hello/
配置如下:
#resources\config\routing.yml acme_hello_homepage: path: /hello/{name} defaults: { _controller: acmehellobundle:default:index } #app\config\routing.yml acme_hello: resource: @acmehellobundle/resources/config/routing.yml prefix: /
symfony 版本为2.5.6
本人对于这个框架只限于看了官方的文档,我自己研究了会不知道为啥还是不行
望哪位大大 能提点下~~
回复内容: php app/console generate:bundle --namespace=acme/hellobundle --format=yml
这个语句一直回车生成代码之后 然后 访问/app_dev.php/hello/ 显示
no route found for get /hello/
配置如下:
#resources\config\routing.yml acme_hello_homepage: path: /hello/{name} defaults: { _controller: acmehellobundle:default:index } #app\config\routing.yml acme_hello: resource: @acmehellobundle/resources/config/routing.yml prefix: /
symfony 版本为2.5.6
本人对于这个框架只限于看了官方的文档,我自己研究了会不知道为啥还是不行
望哪位大大 能提点下~~
你试过清除cache了吗?
清除命令是:
app/console cache:clear --env=prodapp/console cache:clear --env=dev
同样的,你需要检查route是否配置正确
app/console router:debug
路由是 /hello/{name}
你访问 /hello/mot 就有了
