search

Home  >  Q&A  >  body text

PHP 如何获取当前某个时间 当天的时间戳

PHP 如何获取当前某个时间 当天的时间戳。

黄舟黄舟2902 days ago581

reply all(3)I'll reply

  • 巴扎黑

    巴扎黑2017-04-10 15:12:25

    <?php 
    // http://3v4l.org/AvdDZ
    $d = new DateTime("7:00", new DateTimeZone("Asia/Shanghai"));
    echo $d->format("Y-m-d H:i:s");
    

    reply
    0
  • PHP中文网

    PHP中文网2017-04-10 15:12:25

    echo strtotime("+100 days");

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-10 15:12:25

    mktime($hour, $minute, $second, $month, $day, $year);
    

    reply
    0
  • Cancelreply