可是为什么要在服务器上设置存储COOKIES的目录?????
谁告诉你的??

解决方案 »

  1.   

    估计楼主所说的就是类似于discuz
    // [EN] Special parameters $cookiedomain = ''; // cookie 作用域
    $cookiepath = '/'; // cookie 作用路径
      

  2.   

    你用一下cookies,看看那个路径里有没有文件...
      

  3.   

    看手册。cookie那一节
    path The path on the server in which the cookie will be available on.  If set to '/', the cookie will be available within the entire domain. If set to '/foo/', the cookie will only be available within the /foo/ directory and all sub-directories such as /foo/bar/ of domain. The default value is the current directory that the cookie is being set in.
      

  4.   

    domain The domain that the cookie is available.  To make the cookie available on all subdomains of example.com then you'd set it to '.example.com'. The . is not required but makes it compatible with more browsers. Setting it to www.example.com will make the cookie only available in the www subdomain. Refer to tail matching in the spec for details.
      

  5.   

    就比如我写
    setcookie("user_id",$uu_id,time()+31536000,"/~03th/");
    "/~03th/"就是楼主所有的那个目录名吧?~我这里有个问题想问问,
    setcookie("user_id",$uu_id,time()+31536000);
    这样是可以了,但加上后
    setcookie("user_id",$uu_id,time()+31536000,"/~03th/");
    这样就没有效果了,不知为什么?
      

  6.   

    楼主说的目录,是php用来保存临时文件用的,所以服务器上必须有。
      

  7.   

    路过......._____________________________________________________________
    费ASP.NET空间申请http://www.kingtoo.com/pdtshw/hstshw/index.asp,
    支持ASP.NET1.1, 2.0
    100M asp.net 空间只要50元(www.kingtoo.com)