作者:上海十里红妆婚礼策划红_196 | 来源:互联网 | 2021-09-26 20:52
yii框架中无法访问gii的解决方法:添加【allowedIPs>[*]】,如【$config[modules][gii][class>yii\gii\Module,allowedIPs>[*]】。
解决方法:
加上 'allowedIPs'=>['*']即可。
(推荐教程:yii框架)
如下:
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'=>['*']
];
}
更多编程相关内容,请关注编程入门栏目!
以上就是yii框架中无法访问gii的详细内容,更多请关注其它相关文章!