首页 > 其他 > 详细

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

时间:2015-05-14 20:08:35      阅读:287      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!