$d=date("Y-m-d H:i:s",strtotime("30 day"));

解决方案 »

  1.   

    $time = time()+ 30*24*3600;
    echo date("Y-m-d H:i:s",$time);不知道有没有问题
      

  2.   

    xuzuning(唠叨) 谢谢
    再搞清楚一个问题就结贴
    2005-04-16 17:48:19
    2005-04-06 17:48:19
    我现在要得到它们之间的天数差怎么办
      

  3.   

    <?$t1="2005-04-16 17:48:19";
    $t2="2005-04-06 17:48:19";$d1=strtotime($t1);
    $d2=strtotime($t2);$dc=date("d",$d1)-date("d",$d2); //天数差echo $dc;?>
      

  4.   

    $t1="2005-04-16 17:48:19";
    $t2="2005-04-06 17:48:19";$d1=strtotime($t1);
    $d2=strtotime($t2);echo ($d1-$d2)/(24*60*60);