复制代码 代码如下:// 取得某月天数,可用于任意月份 function getDays($month, $year) { switch($month) { case 4: case 6: case 9: case 11: $days = 30; break; case 2: if ($year%4==0) { if ($year 0==0) { $days = $year0==0 ? 29 : 28; } else { $days =29; } } else { $days = 28; } b