这篇文章主要介绍了php求今天、昨天、明天时间戳的方法,实例分析了strtotime函数的常见使用技巧,非常简单实用,需要的朋友可以参考下
具体如下:
echo strtotime('now'),'
';//现在
echo strtotime('today'),'
';//今天
echo strtotime('tomorrow'),'
';//明天
echo strtotime('yesterday'),'
';//昨天
运行结果如下:
1469674869
1469664000
1469750400
1469577600
立即学习“PHP免费学习笔记(深入)”;
今天剩余的秒数:
echo $time_remain = strtotime('tomorrow') - time();
//输出:75531
总结:以上就是本篇文的全部内容,希望能对大家的学习有所帮助。
相关推荐:











