dthyxna3894 2014-12-11 06:05
浏览 58
已采纳

调试模式关闭的新环境仍将kernel.debug检测为true

I have the following new environment:

<?php

use Symfony\Component\ClassLoader\ApcClassLoader;
use Symfony\Component\HttpFoundation\Request;

$loader = require_once __DIR__.'/../app/bootstrap.php.cache';

// Use APC for autoloading to improve performance
// Change 'sf2' by the prefix you want in order to prevent key conflict with another application
/*
$loader = new ApcClassLoader('sf2', $loader);
$loader->register(true);
*/

require_once __DIR__.'/../app/AppKernel.php';
//require_once __DIR__.'/../app/AppCache.php';
$kernel = new AppKernel('mobile', false);
$kernel->loadClassCache();
//$kernel = new AppCache($kernel);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

however when I do the following:

sudo php app/console assetic:dump --env=mobile

it gives me:

Clearing the cache for the mobile environment with debug true

How is it possible that debug is set to true while I have specifically in the new AppKernel('mobile' false);

I have cleared the cache and everything but it is still the same

When I do the following:

 $kernel = $this->get('kernel');
    ladybug_dump($kernel->isDebug());

this returns false, however it's just the console command that is not getting it right

  • 写回答

1条回答 默认 最新

  • dspvin19712 2014-12-11 06:51
    关注
    sudo php app/console assetic:dump --env=dev --no-debug
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
  • ¥20 有人知道这种图怎么画吗?
  • ¥15 pyqt6如何引用qrc文件加载里面的的资源
  • ¥15 安卓JNI项目使用lua上的问题