PHP时间戳与日期的转换

strtotime()
是php中的时间函数;其功能是:将任何字符串形式的日期,时间转换成对应的Unix 时间戳。

date
函数作用为取得当前系统日期,且不需要参数

php比较时间一般都是变成时间戳去比较的。
使用函数strtotime函数把时间变成时间戳。

猜你喜欢

转载自blog.csdn.net/weixin_44900765/article/details/106351619