可能重复:
How to get previous month and year relative to today, using strtotime and date?
今天是12月31日,但strtotime("-1 months")返回12月:
echo date("Y-m", strtotime("-1 months"));strtotime("last month")也是如此
如何正确返回上个月(11月份)?
测试:http://codepad.viper-7.com/XvMaMB
https://stackoverflow.com/questions/14102625
复制相似问题