<?php date_default_timezone_set("PRC"); //date函数 $time1=date("Y年m月d日 H点i分s秒"); echo "date()函数的结果是:".$time1; echo "<br>"; //getdate()函数 $time=getdate(); $time2=$time['year']."年".$time['mon']."月".$time['mday']."日 ".$time['hours']."点".$time['minutes']."分".$time['seconds']."秒"; echo "getdate()的结果是".$time2;