//计算日期的前N天,
//echo post_date('2006-7-22',14);
//echo post_date('2006-7-22',-14);
function post_date($date, $days) {
$t1 = strtotime($date);
$t2 = $t1 - $days*3600*24;
return date("Y-m-d", $t2);
}
//echo post_date('2006-7-22',14);
//echo post_date('2006-7-22',-14);
function post_date($date, $days) {
$t1 = strtotime($date);
$t2 = $t1 - $days*3600*24;
return date("Y-m-d", $t2);
}
结帖...