本文實(shí)例講述了php求今天、昨天、明天時(shí)間戳的簡(jiǎn)單實(shí)現(xiàn)方法。分享給大家供大家參考,具體如下:
echo strtotime('now'),'<br>';//現(xiàn)在echo strtotime('today'),'<br>';//今天echo strtotime('tomorrow'),'<br>';//明天echo strtotime('yesterday'),'<br>';//昨天運(yùn)行結(jié)果如下:
1469674869
1469664000
1469750400
1469577600
今天剩余的秒數(shù):
echo $time_remain = strtotime('tomorrow') - time();//輸出:75531希望本文所述對(duì)大家PHP程序設(shè)計(jì)有所幫助。
新聞熱點(diǎn)
疑難解答
圖片精選