本身和安裝到本地沒啥區別,只是看不到下面的debug條了。原來默認只允許本地訪問才能看到debug條。
參考:http://yii2.techbrood.com/guide-module-debug.html
main-local.php做如下調整
if (!YII_ENV_TEST) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
$config['modules']['debug']['class'] = 'yii\debug\Module';
$config['modules']['debug']['allowedIPs'] = ['192.168.30.*'];
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = 'yii\gii\Module';
}