I just took a look at Yii. The installation documentation says to add the gii module, but after adding the following code, when accessing index.php?r=gii, a login box pops up and you cannot log in after entering your password. , or on the index.php?r=gii/default/login page. Look at the request, there is a request for index.php?r=gii, and 302 is returned.
``` $config['bootstrap'][] = 'gii'; $config['modules']['gii'] = [ 'class' => 'yii\gii\Module', // uncomment the following to add your IP if you are not connecting from localhost. 'allowedIPs' => ['127.0.0.1', '::1'], //允许访问的ip是本地ip,修改为所有ip均可访问。 ]; ```` ```` $config['bootstrap'][] = 'gii'; $config['modules']['gii'] = [ 'class' => 'yii\gii\Module', // uncomment the following to add your IP if you are not connecting from localhost. 'allowedIPs' => ['*', '::1'], //允许访问的ip是本地ip,修改为所有ip均可访问。 ]; ```
php Chinese website, a large number of free yii introductory tutorials, welcome to learn online!
The above is the detailed content of What should I do if the gii in yii cannot be opened?. For more information, please follow other related articles on the PHP Chinese website!