现在调用未定义的函数()

Car*_*rlo 0 php authentication codeigniter ion-auth

我在我正在研究的网站中使用Ion Auth库进行身份验证系统.它没有任何问题,但从昨天起我收到此错误:

PHP Fatal error:  Call to undefined function now() in /home/carlo/public_html/website/application/models/ion_auth_model.php on line 996
Run Code Online (Sandbox Code Playgroud)

该行中的代码是这样的:

        $this->db->update($this->tables['users'], array('last_login' => now()), array('id' => $id));
Run Code Online (Sandbox Code Playgroud)

我读到now()是一个mysql函数,在php中你应该使用date(),但我觉得奇怪的是,在库里有一个不存在的函数.知道这里发生了什么吗?

Stu*_*tuR 7

使用Codeigniters date hepler,它将允许你使用now().

$this->load->helper('date');
Run Code Online (Sandbox Code Playgroud)