$start_time = strtotime(date('Y-m-01 00:00:00'));
$end_time = strtotime(date('Y-m-t 23:59:59'));
echo "本月起始时间戳:".$start_time."<br>";
echo "本月结束时间戳:".$end_time."<br>";
php 时间函数
于 2023-09-11 16:39:39 首次发布
$start_time = strtotime(date('Y-m-01 00:00:00'));
$end_time = strtotime(date('Y-m-t 23:59:59'));
echo "本月起始时间戳:".$start_time."<br>";
echo "本月结束时间戳:".$end_time."<br>";