首页 >后端开发 >php教程 >php获得某段时间区间的时间戳并定时发信的代码

php获得某段时间区间的时间戳并定时发信的代码

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-07-25 09:04:501003浏览
  1. $y=date("Y",time());

  2. $m=date("m",time());
  3. $d=date("d",time());
  4. $start_time = mktime(9, 0, 0, $m, $d ,$y);
  5. $end_time = mktime(19, 0, 0, $m, $d ,$y);
  6. $time = time();

  7. if($time >= $start_time && $time {
  8. // do something....
  9. }
复制代码


声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn