lizd11 发表于 2009-11-18 14:56:39

DX auth:unexpected T_OBJECT_OPERATOR

将CI DX_auth移植 Godday 服务器,出现一下错,
Parse error: parse error, unexpected T_OBJECT_OPERATOR
in .........../libraries/DX_Auth.php on line 803
请求帮助!!!急

Hex 发表于 2009-11-18 15:18:58

贴一下 803 附近的代码看看。

lizd11 发表于 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'));
        }

Hex 发表于 2009-11-18 18:34:56

哪个是 803?

lizd11 发表于 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'));

lizd11 发表于 2009-11-18 18:39:06

网上查了很多资料,说是PHP4 的问题,我本机是PHP5的可以运行, Godday上是PHP4的。
不知道能否修改,如果不能的话,麻烦推荐一下,有啥好用的Auth ?

Hex 发表于 2009-11-18 19:49:21

check_attempts($this->ci->input->ip_address())->num_rows()

类似这种链式方法只有 PHP5 支持。

lizd11 发表于 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

Hex 发表于 2009-11-19 02:06:52

Godday 不了解,不知道能不能换成 php5

lizd11 发表于 2009-11-19 16:35:16

在PHP4上运行的CI auth 插件有吗?那个好用些?
页: [1] 2
查看完整版本: DX auth:unexpected T_OBJECT_OPERATOR