<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>获取当前时间戳</title> </head> <body> <?php $nextWeek = time() + (7 * 24 * 60 * 60); //7 days; 24 hours; 60 mins; 60secs echo "Now:". date("Y-m-d")."<br>"; //输出当前日期 echo "Next Week: ". date("Y-m-d", $nextWeek); //输出变量nextweek的日期 ?> </body> </html>