thinkphp关于时间加减几天

1.当前时间,往后退5天: date('Y-m-d H:i:s',strtotime('-1 days'));

2.有固定时间,往后面退一天或者七天,或者30天:

比如时间:$time = 2014-12-05 14:48:59

往后推一天:$time_sp=strtotime($time); //转化为时间戳

date('Y-m-d H:i:s',strtotime('-1 day ',$time_sp));

原文地址:https://www.cnblogs.com/kobigood/p/4148245.html