note 39213 added to reserved.variables

From: Date: Tue, 20 Jan 2004 23:24:18 +0000
Subject: note 39213 added to reserved.variables
Groups: php.notes 
Request: Send a blank email to php-notes+get-63909@lists.php.net to get a copy of this message
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"; ?> ---- Manual Page -- http://www.php.net/manual/en/reserved.variables.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39213 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39213&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39213&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#63909) next »