如何在Php中查找下一个过期日期
在我的Php项目中,我想知道截止日期(例如,今天是我的加入日期,然后我的截止日期是下个月,即有效期为1个月) 最好的方法是什么。您需要看看,看看示例。这个怎么样如何在Php中查找下一个过期日期,php,Php,在我的Php项目中,我想知道截止日期(例如,今天是我的加入日期,然后我的截止日期是下个月,即有效期为1个月) 最好的方法是什么。您需要看看,看看示例。这个怎么样 找出什么时候,在什么情况下?需要更多的细节。任何重复的。请使用搜索功能。到目前为止,类似的问题有数百个。尽管这是正确的,但不鼓励使用RTFM风格的答案和/或评论。 $date = date("Y-m-d");// current date $date = strtotime(date("Y-m-d", strtotime($date
找出什么时候,在什么情况下?需要更多的细节。任何重复的。请使用搜索功能。到目前为止,类似的问题有数百个。尽管这是正确的,但不鼓励使用RTFM风格的答案和/或评论。
$date = date("Y-m-d");// current date
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 day");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 week");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +2 week");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 month");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +30 days")