note 39213 rejected from reserved.variables by betz
| From: | betz@php.net | Date: | Wed, 21 Jan 2004 00:00:38 +0000 |
| Subject: | note 39213 rejected from reserved.variables by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-63911@lists.php.net to get a copy of this message | ||
Note Submitter: CydeSwype
----
Not sure if this is a bug or just a gotcha. On a windows server (haven't tested *nix yet) when
including a file via an absolute URL:
<? include "http://yahoo.com/header.php"; ?>
and then in the header.php if you reference environment variables or server variables (most notably
$_ENV["REMOTE_ADDR"] and the like) you will get the SERVER's IP address and not the
IP address of your client. If you want to get the client's IP address, make sure you're
using relative path includes like this:
<? include "../header.php"; ?>