Home >Backend Development >PHP Tutorial >二个时间相减的有关问题

二个时间相减的有关问题

WBOY
WBOYOriginal
2016-06-13 10:06:24817browse

二个时间相减的问题?
我想计算出最近半个小时之内登陆过的用户
$row["user_lastLogin"] = 2011-12-10 10:20:57
可是二个时间相减之后/3600的值是367633;请问为什么?
php.ini里面也设成了asia/shanghai了
$lasttime = $row["user_lastLogin"];
echo floor((time() - $lasttime )/3600);


------解决方案--------------------
路过,关注

是什么呢??

时间截。秒数?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn