0
我有以下问题 首先这里是我的代码:PHP DateDiff错误?
$day_difference = 1;
while (strtotime('-' . $day_difference . ' day', time()) >= strtotime('2011-12-12 00:08:00')) {
#echo $day_difference;
$day_difference++;
}
$datediff = $day_difference;
此代码应输出1每天不2天
有什么不对?
它不? http://codepad.org/zTJEgspS –
好吧,似乎是与时区有关? –