Re: $_COOKIE and include() or require()
| From: | Jason Wong | Date: | Mon, 23 Dec 2002 11:21:17 +0000 |
| Subject: | Re: $_COOKIE and include() or require() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129162@lists.php.net to get a copy of this message | ||
On Monday 23 December 2002 15:19, Luke Sneeringer wrote:
> 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.
Is common.php on the same server as index.php? If so, then (unless you have
special reasons otherwise), you should NOT be including via URL but via the
local filesystem:
include('local/filesystem/path/to/common.php');
What does common.php do anyway? There is a whole world of difference between
including a file via URL and via filesystem.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
There is never time to do it right, but always time to do it over.
*/