你没有设定cookies的时间,默认为即时的。

解决方案 »

  1.   

    $set1=setcookie("username",$username,86400,"/","");
    $set2=setcookie("userid",8,86400,"/","");
    $set3=setcookie("groupid",1,86400,"/","");
    $set4=setcookie("rnd",1,86400,"/","");改成了这样还是不行,网站的程序运行时调用的函数和设置cookie的函数是在同一个文件中的。
      

  2.   

    check the cookies configure in php.ini especially the cookie root.
      

  3.   

    时间设置成time()+86400才是一天,否则是1970年1月1日00:00:00后的一天