当我使用app_dev.php访问我的Symfony2项目时,我看到了我的网站.当我使用app.php访问它时,我看到了针对新项目的Symfony2欢迎页面.
我没有在config_dev.yml或routing_dev.yml文件中添加任何内容.我已经运行php app/console cache:clear.为什么我不能在开发模式之外看到我的项目?
这是我的routing.yml
_welcome:
resource: "@FooBundle/Resources/config/routing.yml"
Run Code Online (Sandbox Code Playgroud)
和我的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: "@SymfonyWebConfiguratorBundle/Resources/config/routing/configurator.xml"
prefix: /_configurator
_main:
resource: routing.yml
Run Code Online (Sandbox Code Playgroud)
和FooBundle/Resources/config/routing.yml
homepage:
pattern: /
defaults: { _controller: FooBundle:Default:index }
(other stuff...)
Run Code Online (Sandbox Code Playgroud)
PAS*_*LoD 12
试试这个:
php app/console --env=prod cache:clear
Run Code Online (Sandbox Code Playgroud)
您也可以尝试调试路由:
php app/console --env=prod router:debug
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5046 次 |
| 最近记录: |