好的,我有一个cookie集,我可以清楚地看到,如果我在Firefox中的私人数据…好的,所以当我回覆在一个页面上的某个目录,它的工作,(www.example.com/dir),但是在网站的索引页(www.example.com)上,它不会回显,它表示Cookie未设置.是的,我启用了cookies,是的,我尝试清除缓存和所有这些.有任何想法吗?
PHP btw
当cookie设置时,你在哪个目录?
从PHP manual on setcookie()年,重点在于:
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.