Cookies - can read from one directory and not another ??
Posted: Thu Oct 09, 2003 5:29 pm
Hi,
After setting a cookie with
setcookie('NsODyRhEkx', '1', time()+60*60*24*300, "/" );
I've got this code below.
Then I run it in one directory it works and shows that that cookie was set.
But when I run it in the directory that contains this directory, it shows that cookie as not being set.
Any ideas why this is?
I'd like to keep the directory structure the same for the backend design of the site to remain structured.
Thanx for you help,
Eli
After setting a cookie with
setcookie('NsODyRhEkx', '1', time()+60*60*24*300, "/" );
I've got this code below.
Then I run it in one directory it works and shows that that cookie was set.
But when I run it in the directory that contains this directory, it shows that cookie as not being set.
Any ideas why this is?
I'd like to keep the directory structure the same for the backend design of the site to remain structured.
Thanx for you help,
Eli
Code: Select all
<?
# --------------------------------------------------- #
if (isset($_COOKIEї'NsODyRhEkx'])) {
print "set::".$_COOKIEї'NsODyRhEkx'];
} else {
print "not set";
}
# --------------------------------------------------- #
print "<hr>";
print_r($_COOKIE);
# --------------------------------------------------- #
?>