獲取前一天的時間:
date("Y-m-d H:i:s", strtotime("-1 day"));
獲取三天前的時間:
date("Y-m-d H:i:s", strtotime("-3 day"));
獲取前一個月的時間:
date("Y-m-d H:i:s", strtotime("-1 month"));
獲取前3個月的時間:
date("Y-m-d H:i:s", strtotime("-3 month"));
獲取前一個小時的時間:
date("Y-m-d H:i:s", strtotime("-1 hour"));
獲取前一年的時間:
date("Y-m-d H:i:s", strtotime("-1 year"));