1

它给了我错误。

错误 403 您无权访问此页面。

我已在受保护目录内的 main.php 文件中取消注释此代码。

'gii'=>array(
        'class'=>'system.gii.GiiModule',
        'password'=>'admin',
        // If removed, Gii defaults to localhost only. Edit carefully to taste.
        'ipFilters'=>array('127.0.0.1','::1'),
    ),

请帮忙。

4

3 回答 3

3

这是您的问题的解决方案:

http://www.yiiframework.com/wiki/115/why-do-i-get-a-403-error-when-trying-to-use-gii/

您需要将您的 IP 地址添加到“ipFilters”数组中

'ipFilters' => array('127.0.0.1', 'your_ip_address')
于 2013-06-05T15:03:41.213 回答
1

您正在使用 gii 访问localhost吗?您可以使用 访问您的本地网络服务器localhost吗?localhost如果您没有映射127.0.0.1到默认情况下为您完成的大部分时间,则您无法访问您的网络服务器,localhost具体取决于您的系统和安装方式php / apache

于 2013-06-05T14:50:31.100 回答
0
'ipFilters'=>array('127.0.0.1','*.*.*.*')

然后关闭它或稍后将其更改回来...

因为如果你不... 孩子们会带你失望

于 2013-10-03T06:47:40.600 回答