Home >PHP Framework >YII >What should I do if a 403 error occurs on the yii2 website?

What should I do if a 403 error occurs on the yii2 website?

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-12-07 15:52:423675browse

What should I do if a 403 error occurs on the yii2 website?

The reason why this error occurs in the first place is that you are not allowed to access the page, which is also a security consideration of the yii2 framework.

We need to configure the gii tool in config/web.php:

'gii' => [ 'class' => 'yii\gii\Module','allowedIPs' => ['127.0.0.1','::1','192.168.0.*','192.168.178.20']
//在这里添加上你的电脑的IP即可]

After adding it, visit basic/web/index.php?r=gii to access the GII tool page

What should I do if a 403 error occurs on the yii2 website?

PHP Chinese website has a large number of free Yii introductory tutorials, everyone is welcome to learn!

The above is the detailed content of What should I do if a 403 error occurs on the yii2 website?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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

Related articles

See more