用户
 找回密码
 入住 CI 中国社区
搜索
查看: 7911|回复: 11
收起左侧

[权限控制] DX auth:unexpected T_OBJECT_OPERATOR

[复制链接]
发表于 2009-11-18 14:56:39 | 显示全部楼层 |阅读模式
将CI DX_auth  移植 Godday 服务器,出现一下错,
Parse error: parse error, unexpected T_OBJECT_OPERATOR
in .........../libraries/DX_Auth.php on line 803
请求帮助!!!急
发表于 2009-11-18 15:18:58 | 显示全部楼层
贴一下 803 附近的代码看看。
 楼主| 发表于 2009-11-18 18:27:17 | 显示全部楼层
function is_max_login_attempts_exceeded()
        {
                $this->ci->load->model('dx_auth/login_attempts', 'login_attempts');
                return ($this->ci->login_attempts->check_attempts($this->ci->input->ip_address())->num_rows() >= $this->ci->config->item('DX_max_login_attempts'));
                //return ($this->ci->login_attempts->check_attempts($this->ci->input->ip_address()) >= $this->ci->config->item('DX_max_login_attempts'));
        }
发表于 2009-11-18 18:34:56 | 显示全部楼层
哪个是 803?
 楼主| 发表于 2009-11-18 18:37:09 | 显示全部楼层
return ($this->ci->login_attempts->check_attempts($this->ci->input->ip_address())->num_rows() >= $this->ci->config->item('DX_max_login_attempts'));
 楼主| 发表于 2009-11-18 18:39:06 | 显示全部楼层
网上查了很多资料,说是PHP4 的问题,我本机是PHP5的可以运行, Godday上是PHP4的。
不知道能否修改,如果不能的话,麻烦推荐一下,有啥好用的Auth ?
发表于 2009-11-18 19:49:21 | 显示全部楼层
check_attempts($this->ci->input->ip_address())->num_rows()

类似这种链式方法只有 PHP5 支持。
 楼主| 发表于 2009-11-19 00:28:54 | 显示全部楼层
Godday 上可以通过一下改变吗?

Options +FollowSymLinks
RewriteEngine On
RewriteBase /

# switch GoDaddy's php extension handling for php5
AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4
发表于 2009-11-19 02:06:52 | 显示全部楼层
Godday 不了解,不知道能不能换成 php5
 楼主| 发表于 2009-11-19 16:35:16 | 显示全部楼层
在PHP4上运行的CI auth 插件有吗?那个好用些?

本版积分规则