Yii-You are not allowed to access this page

yii-You are not allowed to access this page

Error 403
You are not allowed to access this page.

问题分析:yii处于安全考虑。默认情况下允许在本机运行gii组件。所以出现上述问题,一般都是服务器不是本机。

解决方法:编辑你的main.php配置文件

‘modules’=>array(
‘gii’=>array(
‘class’=>’system.gii.GiiModule’,
‘password’=>’password’,
‘ipFilters’=>array(‘127.0.0.1′,’::1′), //将此处的IP改为本机目前使用的IP
),
),

在ipFilters中设置你的本机IP   (记住是你本机  客户端ip 而不是服务端ip)

你可能感兴趣的:(PHP,yii)