點選次數:7570 更新日期:2014-05-14
目前時間增加一天: eccho date('Y-m-d',strtotime("+1 day"))
目前時間增加一月: strtotime("+1 month")
目前時間增加一年: strtotime("+1 year")
目前時間增加一秒: strtotime("+1 seconds")
已有時間增加一天:
$d='2012-10-11';
eccho date('Y-m-d',strtotime("{$d} +1 day"));
更多的有
echo strtotime( 'yesterday ')
echo date( "Ymd ",strtotime( 'last week '));
本文轉自 IT阿飛 51CTO部落格,原文連結:http://blog.51cto.com/itafei/1975978