Re: Accessing cookies in required files
| From: | Leif K-Brooks | Date: | Thu, 27 Jun 2002 08:29:36 +0000 |
| Subject: | Re: Accessing cookies in required files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-104115@lists.php.net to get a copy of this message | ||
This sounds like a problem with the function, not file. Are you globaling the variable with the cookie?
Chris Morrow wrote:
Hi, Can anyone help with this problem? I have a file called "settings.inc" which I include in all files on my site like this: require("settings.inc"); Up until now this has worked fine. But now I have a function in the settings.inc file that tries to read the value of a cookie called "testcookie". My problem is that the settings.inc file doesn't seem to be able to access the cookie at all. But if I try to access it direct from a page rather than the required file it works fine. Does anybody know why I can't access my cookie in my required file? They are all on the same directory level etc. Thanks for any help.