调用未定义功能NOW() [英] Call to undefined function now()
本文介绍了调用未定义功能NOW()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的离子验证库在一个网站我工作的认证系统。它的工作没有任何问题,但因为昨天我得到这个错误:
I'm using the Ion Auth library for the authentication system in a website I'm working on. It worked without any problem, but since yesterday I'm getting this error:
PHP Fatal error: Call to undefined function now() in /home/carlo/public_html/website/application/models/ion_auth_model.php on line 996
在该行的code是这样的:
The code in that line is this:
$this->db->update($this->tables['users'], array('last_login' => now()), array('id' => $id));
我看了,现在()是一个MySQL函数在PHP你应该使用日期(),但似乎奇怪,我在图书馆里是不存在的功能。
任何想法,这里发生了什么?
I read that now() is a mysql function and in php you should use date(), but it seems strange to me that in the library there is a non existing function. Any idea what's happening here?
推荐答案
使用codeigniters日期赫普勒,它可以让你现在使用()。
Use Codeigniters date hepler, it will allow you to use now().
$this->load->helper('date');
这篇关于调用未定义功能NOW()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文