$ti = $DT_TIME - $t[edittime];
$di = floor($ti/60/60/24);
$hi = floor($ti/60/60);
$ii = floor($ti/60);
$si = floor($ti/1);
if(1<$di){
echo "$di 天前";
}
elseif(1<$hi)
{
echo "$hi 时前";
}
elseif(1<$ii)
{
echo "$ii 分前";
}
elseif(1<$si)
{
echo "$si 秒前";
}
?>
|