码迷,mamicode.com
首页 > 其他好文 > 详细

yii2中gii外网访问的配置方法

时间:2015-05-14 20:11:12      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:

if (YII_ENV_DEV) {
    // configuration adjustments for ‘dev‘ environment
    $config[‘bootstrap‘][] = ‘debug‘;
    $config[‘modules‘][‘debug‘] = ‘yii\debug\Module‘;

    $config[‘bootstrap‘][] = ‘gii‘;
    $config[‘modules‘][‘gii‘] = [
        ‘class‘ => ‘yii\gii\Module‘,
        ‘allowedIPs‘ => [‘127.0.0.1‘, ‘::1‘, ‘192.168.0.*‘, ‘192.168.178.20‘],
    ];
}

 看来多读英文网站还是很有好处的

我配置文件写错位置了

In basic application template configuration structure is a bit different so Gii should be configured in config/web.php:

basic模版中配置结构有一点不同

所以应如上写

那么问题来了,basic例子中这么写是个特例,正常是如何?

技术分享

yii2中gii外网访问的配置方法

标签:

原文地址:http://www.cnblogs.com/asworm/p/4504137.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!