且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 PHP 中增加日期的最简单方法?

更新时间:2022-03-21 21:33:55

使用strtotime()

$date = strtotime("+1 day", strtotime("2007-02-28"));
echo date("Y-m-d", $date);

会给你 2007-03-01

Will give you the 2007-03-01