public function strtotime_date($time)
{
$time = explode('-', $time);
$year = $time[0];
$month = $time[1];
$beginDate = date('Y-m-01', strtotime("$year-$month"));
$endDate = date('Y-m-d', strtotime("$beginDate +1 month -1 day"));
print_r($beginDate.'||'.$endDate);
}
转载于:https://blog.51cto.com/laok8/1914883