//通常用于定制服务的时候使用,比如包月会员,包年等等
//获取当前时间过一个月的时间,以DATETIME格式显示
date('Y-m-d H:i:s',strtotime('+1 month'))
//获取当前时间过一个月的时间,以时间戳格式显示
strtotime(date('Y-m-d H:i:s',strtotime('+1 month')))
//以下是年,月,周,天,时,分秒的用法
date("Y-m-d H:i:s", strtotime(" +2 year"));
date("Y-m-d H:i:s", strtotime(" +2 month"));
date("Y-m-d H:i:s", strtotime(" +2 week"));
date("Y-m-d H:i:s", strtotime(" +2 day"));
date("Y-m-d H:i:s", strtotime(" +2 hour"));
date("Y-m-d H:i:s", strtotime(" +2 minute"));
date("Y-m-d H:i:s", strtotime(" +2 second"));
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn