php cookie奇咄咄怪事,显示不一致

WBOY
Release: 2016-06-13 12:43:40
Original
778 people have browsed it

php cookie奇怪事,显示不一致
localhost/test.php
localhost/test/test.php

这两个文件是同一个文件考过去的
内容就是一句话  print_r($_COOKIE);
但是两个url显示的确是不一样的数据啊
//Array ( [TEST] => TEST index ) 
//Array ( [TEST] => TEST test ) 
本能认为肯定是我重set了,
但我仔细检查N遍了,现在就是一句话,print_r($_COOKIE);
怎么cookie和路径有关系了呢?????

设置一次我就把下句删掉了,我是这样设的,不应该与路径有关啊
//setcookie("TEST","TEST index", time()+3600*24*1);


另外说明一点,同级目录得到数据是相同的,求解~~~~~~~~~~~~~~~~

Cookie PHP
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template