php时间戳增加时间的方法:首先创建一个PHP示例文件;然后通过“strtotime("+1 year");”方法将当前时间戳增加一年的时间;最后输出增加后的结果即可。
推荐:《PHP视频教程》
php当前时间戳增加时间
php将当i 9 S | % @前时间戳增加一年(year)
echo strtotimeB I P 7 _ l C m ]("+1 yeae 2 p 9 , mry ; 1 A");//返回时间戳, 如果要转换成m d c L L g f一般时` ` } )间格式还需要下面的函数
echo date('Y-m-d H:i:s', strto= c f - c 2 c M (time("+1 year"));
同理,不仅仅可以+year 还可以是天, 月日都可以的,如下代码:
<?php 以上就是php! l b时间戳增加时间的方法的详细内容。
echo st+ u $ @ rtotime("now"), "\n";
echo strtotime("10 September 2000"), "\n";
echo s^ } T ` + I B ! ltrtotime("+1 day"), "\n";
echo strtotime("+1 week"), "\n";
echo strtotime("+1 week 2 days 4 hours 2 secoo N ? jnds"), "\n";
echo strtotime("nextH d F ThursD m mday"),a 1 ? "\b I N 9 tn";
echo strtotime("last MonV 4 - s ! C 2 G qdaS 4 u d J j D / wy"), "\n";
?>