Home > Backend Development > PHP Tutorial > PHP时间有关问题

PHP时间有关问题

WBOY
Release: 2016-06-13 13:42:19
Original
824 people have browsed it

PHP时间问题
注册时$regdate = date("Y-m-d")
存入数据库 但是注册后查看数据库中时logtime中均显示0000-00-00
用输出语句查看时显示1970-01-01
是什么原因?如何改动

------解决方案--------------------
其实你直接
$sql = "INSERT INTO register(name,password,email,logTime,score)VALUES('$username','$password','$email',now(),10)";
更好些

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template