時間計數?
請問一下如果記錄一件物品安裝的時間到目前為止共使用多少小時
程式該如何撰寫呢? [b]回復 [url=http://forum.twbts.com/redirect.php?goto=findpost&pid=71392&ptid=12666]1#[/url] [i]terence0916[/i] [/b][code]<?
$nowtime = date("Y-m-d H:00:00");
$settime = "2014-10-31 08:00:00";
$subtraction = (strtotime($nowtime)-strtotime($settime)/(60*60));
echo $subteaction;
?>[/code]
頁:
[1]