为什么我在程序中 setCookie("username","zhangsan",time()+3600*24,"/"); 这样写在新打开的窗口获取不了那个cookie值呢,以前是管用的两天之后又不管用了,还有cookie跨域怎么使用啊, 请高手赐教......

解决方案 »

  1.   

    setCookie("username","zhangsan",time()+3600*24,"/")你这样写是不是有问题的。
      

  2.   

    这个网址里有你想要的答案。
    http://www.bhcode.net/article/20080910/2384.html
      

  3.   

    setCookie("username","zhangsan",mktime()+3600*24,"/"); 
    试试
      

  4.   

    对呀 time()函数得到的是字符串~~~
      

  5.   

    setCookie("username",serialize("zhangsan"),time()+3600*24,"/");