在演示中获取探查器工具栏

时间:2017-03-14 17:05:35

标签: symfony-3.1

我没有设法在演示环境中获取Symfony 3.1分析器工具栏

AppKernel.php:为演示

启用了捆绑包
if (in_array($this->getEnvironment(), ['dev', 'demo'], true)) {
     $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
     $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
     $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
     $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
     $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
}

config_demo.yml

framework:
  router:
        resource: "%kernel.root_dir%/config/routing_demo.yml"
        strict_requirements: true
  profiler: false

web_profiler:
  toolbar: true
  intercept_redirects: false

app_demo.php

$loader = require __DIR__.'/../app/autoload.php';
Debug::enable();

$kernel = new AppKernel('demo', true);
$kernel->loadClassCache();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

routing_demo.yml

_wdt:
  resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
  prefix:   /_wdt

_profiler:
  resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
  prefix:   /_profiler

是的,我的主页上有正文标记

我错过了什么? 感谢

1 个答案:

答案 0 :(得分:0)

确定我的错误

我的演示htaccess使用的是app.php而不是app_demo.php

抱歉!