使用php計算某日是幾天後
<?php
//未來日期的時間戳記
$exp = @strtotime($argv[1]);
//今天的時間戳記
$today = @strtotime(@date("Ymd"));
//相差的時間戳記除以86400
$days = (($exp-$today)/86400);
//即可得到未來的時間是幾天後
echo $days;
?>
- Aug 25 Mon 2014 18:32
-
使用php計算某日是幾天後
請先 登入 以發表留言。