本来应写作
echo date('Y-m-d', strtotime('last month first day'));
echo date('Y-m-d', strtotime('last month last day'));
不过似乎我的php5.4.20有bug
那就写作
echo date('Y-m-01', strtotime('-1 month'));
echo date('Y-m-t', strtotime('-1 month'));