Home > PHP Framework > YII > What should I do if the gii in yii cannot be opened?

What should I do if the gii in yii cannot be opened?

爱喝马黛茶的安东尼
Release: 2019-11-09 10:48:25
Original
2319 people have browsed it

What should I do if the gii in yii cannot be opened?

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均可访问。
];
```
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template