当我尝试运行http://localhost/app_dev.php时,Symfony2返回找不到"GET /"的路由,但此URL工作正常:http://localhost/app_dev.php/hello/Symfony.我删除了AcmeDemoBundle,我正在尝试从symfony2教程运行一个示例包.怎么了 ?
app/config/routing.yml:
ShopMyShopBundle:
resource: "@ShopMyShopBundle/Resources/config/routing.yml"
prefix: /
Run Code Online (Sandbox Code Playgroud)
app/config/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
Run Code Online (Sandbox Code Playgroud)
src/Shop/MyShopBundle/Resources/config/routing.yml:
ShopMyShopBundle_homepage:
pattern: /hello/{name}
defaults: { _controller: ShopMyShopBundle:Main:index }
requirements:
_method: GET
Run Code Online (Sandbox Code Playgroud) 我正在尝试根据书中的"可选步骤3:创建模板"在symfony 2中运行我的第一个模板但是我得到一个例外: Warning: filemtime() [<a href='function.filemtime'>function.filemtime</a>]: stat failed for C:\Server\Apache2\htdocs\SymfonyProject\src\Acme\HelloBundle/Resources/views/Default/index.html.twig in C:\Server\Apache2\htdocs\SymfonyProject\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\Templating\Loader\FilesystemLoader.php line 68
书中的前几步工作让我不知道出了什么问题.
symfony ×2