~~~
获取window操作机的IP
echo $_SERVER['REMOTE_ADDR'];
~~~
~~~
> web.php
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
// uncomment the following to add your IP if you are not connecting from localhost.
'allowedIPs' => ['112.96.188.198'],//, '::1'
];
~~~
如果创建失败则需要chmod 777 目录
~~~
> 填写ip拥有权限后创建module
app\modules\admin
admin
~~~
~~~
> 开启module:
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
// uncomment the following to add your IP if you are not connecting from localhost.
'allowedIPs' => ['112.96.188.198'],//, '::1'
];
$config['modules']['admin'] = [
'class' => 'app\modules\admin',
];
~~~