I have a question regarding the use of the $_COOKIE autoglobal and
include() or require() tags.
I have a script (index.php) which gets cookie variables. This works
fine, and the cookies are accessable through both $_COOKIE["cookiename"]
and $cookiename.
However, then in the script I have a require tag (essentially like
require('http://www.mydomain.com/common.php')) line. I call this line,
and within that file (same domain) the $_COOKIE[] array as well as
variables such as $cookiename are all blank. I cannot figure out for the
life of me why this is occuring.
The cookies are set with a path of "/", and if I access common.php
directly, the variables are there and accessable. They just don't go
through an include() or require(). I don't understand why this is, since
the PHP documentation says that all variables available to the parent
file at the time of an include() or require() tag are available to the
included file also.
Does anyone know of a solution to this problem? Any help would be
appreciated.
--
Luke Sneeringer
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://www.aggieruf.org/
- [PHP] Plotting Data Graphics Luke Sneeringer
- [PHP] Plotting Data Graphics Alexandre Soares
- Re: [PHP] Plotting Data Graphics Chris Wesley
- Re: [PHP] Plotting Data Graphics Rick Widmer
- Re: [PHP] Plotting Data Graphics Jason Wong
- Re: [PHP] $_COOKIE and include() or require() Chris Wesley
- Re: [PHP] $_COOKIE and include() or require() Jason Wong
- Re: [PHP] $_COOKIE and include() or require() Luke Sneeringer
- Re: [PHP] $_COOKIE and include() or require() Chris Wesley
- Re: [PHP] $_COOKIE and include() or require(... Luke Sneeringer