写法一:
if (!YII_ENV_TEST) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
'class' => 'yii\debug\Module',
'allowedIPs' => ['*']
];
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
'allowedIPs' => ['*']//远程时需要添加ip段
];
}
复制
写法二:
'bootstrap'
=> ['debug'],
'modules'
=> [
'debug'
=> [
'class'
=> 'yii\debug\Module',
'allowedIPs'
=> ['1.2.3.4', '127.0.0.1', '::1']//远程时需要添加ip段
]
]