跳转到主内容
新派编程网 - 新潮编程理念,全新技术课堂!

php中的time(),date(),mktime(),strtotime()_PHP教程_编程技术

time():返回当前的Unix时间戳;

date():格式化一个本地的时间戳;

mktime(时,分,秒,月,日,年):取得一个日期的时间戳;

strtotime():将任何英文文本的日期时间描述解析为Unix时间戳php

”;

echo date('Y-m-d H:i:s',time());echo mktime(13,54,55,9,18,2015);echo strtotime("now");echo strtotime("10 September 2015");echo strtotime("+1 day");echo strtotime("+1 week");echo strtotime("next Thursday");echo strtotime("last Monday");

相关文章