+
95
-

php如何获取今日凌晨0点时间戳?

php

php如何获取今日凌晨0点时间戳?


网友回复

+
15
-

strtotime(date('Y-m-d'))

<?php
echo "今天凌晨时间戳:".strtotime(date('Y-m-d')), "<br>";

//获取明天凌晨的时间戳
echo  "明日凌晨时间戳:".strtotime(date('Y-m-d',strtotime('+1 day'))), "<br>";


echo "今天:".date("Y-m-d")."<br>";    
echo "昨天:".date("Y-m-d",strtotime("-1 day")), "<br>";    
echo "明天:".date("Y-m-d",strtotime("+1 day")). "<br>"; 
echo "一周后:".date("Y-m-d",strtotime("+1 week")). "<br>";    
echo "一周零两天四小时两秒后:".date("Y-m-d G:H:s",strtotime("+1 we...

点击查看剩余70%

我知道答案,我要回答