PHP打印 日期
<?php
echo date('Y-m-d H:i:s', strtotime('-1day'));
echo '<br>';
echo date('Y-m-d H:i:s', strtotime('-1week'));
echo '<br>';
echo date('Y-m-d H:i:s');
echo '<br>';
echo date('Y-m-d H:i:s', strtotime('next Monday'));
echo '<br>';
echo date('Y-m-d H:i:s', strtotime('last Monday'));
echo “现在的时间是:” .date(h:i:sa);
?>
/* 时间差 */
<?php
$startdate = strtotime("2012-01-01");
$enddate = strtotime("2012-02-14");
$days = round(($enddate-$startdate) / 86400)+1;
echo $days;
?>
转载请注明原文地址: https://www.6miu.com/read-69906.html