$time1 = mktime(10,20,30,2,5,2000); //2000-2-5 10:20:30
$time2 = mktime(18,30,20,5,2,2000); //2000-5-2 18:30:20
$diff = (int)(($time2-$time1)/(24*3600));
echo "$time2 和 $time1 的时间差为:" . $diff . "天<br>";
?>
文章来源于领测软件测试网 https://www.ltesting.net/
发布: 2007-7-01 15:06 | 作者: admin | 来源: | 查看: 62次 | 进入软件测试论坛讨论
文章来源于领测软件测试网 https://www.ltesting.net/