php UNIX时间戳转换为指定日期格式

用函数: date() 一般形式:date('Y-m-d H:i:s', unix时间)

 $date_unix=time();//获取当前时间,unix时间戳
echo 'Unix时间:'.$date_unix;
echo '<br>'; $date=date("Y/m/d",$date_unix);//将unix时间戳转化为指定的日期格式
echo '日期格式:'.$date;

效果:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKYAAAAoCAIAAAD7UBaIAAAC+UlEQVR4nO1XwZaEMAjz/3/avXVnCgmhtuq8kpMihZQAO3uchc1wPE2gcDdK8u1Qkm+Hknw7lOTb4Y2SH0fPyloKw3hjKV2Bm/EAuJfjD+OBSoVS6Ubxa+ETzgr9VEKcodScfXoq6iqRr0uutxRaMGTxkBYnfY+c0Sfi/MWTX8+NJfIjzt2zJdeVEl0jRZKTJxFILoUDqad7R2QnPmETfD2nKE5BWCalRkqcYVbWvkLyWXaUvSRPsLLGLE/FbbXk0FOk2FaHu1TRYnGPoOWsXOb9kvMdKy5qlIXwmS/5Sf+koZThVVO1aBzctrPZU9AXI7FwSXgr6NOs9B/jGTrpVFDK7NRen3JUF4LrkivHSSssmvKSHAKJ4S4V1x8F1AvF/Yfr31tCp9skVyKLkg+AR1Cmaqxuuv9vSO6eJaMTRkZnV0w5/8otnJt9Vmq+UPLzu7Kdxb4SGTqf8Bqpy/AjuuS8BdEnxDwbBFHV44T8e4tN9iBaf1hj6kiB4HWVUvo061D4RBVrO5Tk22GO5OEvMn5EP+UeqcWeAizWgeE62+fUL8krko8d3xZMctGO2oJLgv5dQV3FmfyW5LPYjsWZIPmJp5ycIl/H/jRcAd9G4ZXdUCSXHodzDv3de90tubsMuPw60F04iAboLmEfKJLPikN4+jGViKHdLT3Xo+ntvioY1pjHQeXmryIf5VSY6BSlXS05T+nOrpgxyzCLkvzfQ9+fY5JbB9Jn7hZB5IehlBJlb1cYnpZUIuXV18Ilh/gheygJUtcqrZfshZLzdrxf8tOr59rF7u6GTmbSQzw1kZz0DUG2lFeOT4zz2JQHaYyxm3LUHzw18cxKvrT0nOqivNDu8tApWrVauV3JXcuU6gyMNT+7YtqU1Nk4d0uOvqYKpEtu1wBaKnoHZBcjIalff24cvll7nxSVkGJ7nii5uPCvSG5XFAlFnJG/knc4DvI/QemCX0AurCexuB1gfbIpXLbc5ynMIjYtTjZB2HqiYLYtwtQcr5X8bfgDuTrvsPwOS74AAAAASUVORK5CYII=" alt="" />

上一篇:ArcGIS API for Silverlight 地图元素点闪烁,线流动显示的处理方式


下一篇:python>oop