yii2學習筆記(十一)安裝到服務器

本身和安裝到本地沒啥區別,只是看不到下面的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';
}


發佈了43 篇原創文章 · 獲贊 1 · 訪問量 5萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章