Home > Backend Development > PHP Tutorial > yii2环境切换

yii2环境切换

WBOY
Release: 2016-06-06 20:21:18
Original
1468 people have browsed it

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

yii2环境切换

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

yii2环境切换

回复内容:

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

yii2环境切换

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

yii2环境切换

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

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

比如我本地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>
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template