首页 > yii2环境切换

yii2环境切换

我的入口文件已经是正式环境了。。。

但是为什么还会有调试条呢?


难道楼主不是用php init(在项目根目录下)执行切换么?


你要在配置文件中要找到的调试条的配置

$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = 'yii\debug\Module';

比如我本地main-local.php

if (!YII_ENV_TEST) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = 'yii\debug\Module';

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = 'yii\gii\Module';
}

return $config;
【热门文章】
【热门文章】