为了账号安全,请及时绑定邮箱和手机立即绑定

PHP 时间函数

PHP 时间函数

PHP
慕的地10843 2019-03-17 05:37:19
使用 PHP 判断 一个时间 与 当前时间 相比 是否超过了 6小时呢
查看完整描述

2 回答

?
慕神8447489

TA贡献1780条经验 获得超1个赞

$time_6hours_ago = strtotime('-6hour');  #//6小时前的时间戳
$compare_time; //需要判断的时间戳
if($time_6hours_ago > $compare_time){
    #//超过6小时
}
查看完整回答
反对 回复 2019-03-18
  • 2 回答
  • 0 关注
  • 457 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信