php 时间date函数
程序员文章站
2024-01-28 11:38:40
...
date函数默认获取当前时间,mktime返回指定日期的时间戳。
<html>
<body>
<?php
echo date("Y/m/d") . " ";
echo date("Y.m.d") . " ";
echo date("Y-m-d") . " ";
echo " ";
$tomorrow = mktime(0,0,0,date("m"),date("d")+2,date("Y"));
echo "后天是: ".date("Y/m/d", $tomorrow);
?>
</body>
</html>
转载于:https://my.oschina.net/u/147181/blog/164818