PHP打印 日期
<?php
echo date('Y-m-d H:i:s', strtotime('-1day')); //前一天
echo '<br>';
echo date('Y-m-d H:i:s', strtotime('-1week'));//前一周
echo '<br>';
echo date('Y-m-d H:i:s');//现在时间
echo '<br>';
这篇博客主要介绍了如何在PHP中打印日期,包括基本的日期格式化和获取一周内的日期方法。
<?php
echo date('Y-m-d H:i:s', strtotime('-1day')); //前一天
echo '<br>';
echo date('Y-m-d H:i:s', strtotime('-1week'));//前一周
echo '<br>';
echo date('Y-m-d H:i:s');//现在时间
echo '<br>';
390

被折叠的 条评论
为什么被折叠?