呼啦一阵风
这可能很有用:echo Date("Y-m-d", strtotime("2013-01-01 +1 Month -1 Day")); // 2013-01-31echo Date("Y-m-d", strtotime("2013-02-01 +1 Month -1 Day")); // 2013-02-28echo Date("Y-m-d", strtotime("2013-03-01 +1 Month -1 Day")); // 2013-03-31echo Date("Y-m-d", strtotime("2013-04-01 +1 Month -1 Day")); // 2013-04-30echo Date("Y-m-d", strtotime("2013-05-01 +1 Month -1 Day")); // 2013-05-31echo Date("Y-m-d", strtotime("2013-06-01 +1 Month -1 Day")); // 2013-06-30echo Date("Y-m-d", strtotime("2013-07-01 +1 Month -1 Day")); // 2013-07-31echo Date("Y-m-d", strtotime("2013-08-01 +1 Month -1 Day")); // 2013-08-31echo Date("Y-m-d", strtotime("2013-09-01 +1 Month -1 Day")); // 2013-09-30echo Date("Y-m-d", strtotime("2013-10-01 +1 Month -1 Day")); // 2013-10-31echo Date("Y-m-d", strtotime("2013-11-01 +1 Month -1 Day")); // 2013-11-30echo Date("Y-m-d", strtotime("2013-12-01 +1 Month -1 Day")); // 2013-12-31