yii框架开启debug和gii
其实很简单,就是修改config文件夹下的web.php文件,添加红色的2行,我开始将allowedIPs写出allowIPs,一定要注意。其实可以直接查看\vendor\yiisoft\yii2-gii目录下的module类。
if (YII_ENV_DEV) {
// configuration adjustments for ‘dev’ environment
$config[‘bootstrap’][] = ‘debug’;
$config[‘modules’][‘debug’] = [
‘class’ => ‘yii\debug\Module’,
‘allowedIPs’ => [‘*.*.*.*‘,’127.0.0.1’, ‘::1’],
];
$config\['bootstrap'\]\[\] = 'gii';
$config\['modules'\]\['gii'\] = \[
'class' => 'yii\\gii\\Module',
'allowedIPs' => \['\*.\*.\*.\*','127.0.0.1', '::1'\],
\];
}
还没有评论,来说两句吧...