取得一周,一月以前的时间

$t = strtotime('-1 week');

$t = strtotime('-1 month');

$time = date("Y-m-d H:i:s" ,$t);