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?

爱喝马黛茶的安东尼
Release: 2019-12-07 15:52:49
Original
3624 people have browsed it

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即可]
Copy after login

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!

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