Symfony2返回當我嘗試運行http://localhost/app_dev.php時未找到「GET /」的路由,但此網址的工作原理爲:http://localhost/app_dev.php/hello/Symfony。我刪除了AcmeDemoBundle,並試圖從symfony2教程中運行示例包。哪裏不對 ?symfony 2未找到路由「GET /」
應用程序/配置/ routing.yml中:
ShopMyShopBundle:
resource: "@ShopMyShopBundle/Resources/config/routing.yml"
prefix: /
應用程序/配置/ routing_dev.yml:
_assetic:
resource: .
type: assetic
_wdt:
resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
prefix: /_wdt
_profiler:
resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
prefix: /_profiler
_configurator:
resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml"
prefix: /_configurator
_main:
resource: routing.yml
的src /店/ MyShopBundle /資源/配置/ routing.yml中:
ShopMyShopBundle_homepage:
pattern: /hello/{name}
defaults: { _controller: ShopMyShopBundle:Main:index }
requirements:
_method: GET
我現在一樣,我跟所有的建議,但沒有奏效。我想所有回答都已過時。 – samayo
今天我們所擁有的記憶,激活annoations我們包的config.yml文件註釋: 所有: 資源:「@ OurBundle /控制器/」 類型:註釋 – Nico
感謝編輯傑弗裏 – bacbos