yii2环境切换

WBOY
WBOYOriginal
2016-06-06 20:21:181467browse

<code>我的入口文件已经是正式环境了。。。
</code>

yii2环境切换

<code>但是为什么还会有调试条呢?
</code>

yii2环境切换

回复内容:

<code>我的入口文件已经是正式环境了。。。
</code>

yii2环境切换

<code>但是为什么还会有调试条呢?
</code>

yii2环境切换

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

<code>$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = 'yii\debug\Module';</code>

比如我本地main-local.php

<code>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;</code>

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn