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)";更好些