$date=new DateTime(); echo $date->format("Y-m-d h:i:s"); 转载于:https://www.cnblogs.com/feizianquan/p/10536577.html