Re: PHP4 vs PHP5
| From: | Gerry Danen | Date: | Sat, 07 Jan 2006 17:02:05 +0000 |
| Subject: | Re: PHP4 vs PHP5 | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-228292@lists.php.net to get a copy of this message | ||
On 1/7/06, Kevin Waterson <kevin@oceania.net> wrote:
>
> This one time, at band camp, Gerry Danen <gdanen@gmail.com> wrote:
>
> > I'm wondering if $_SERVER['HTTP_REFERER'] is no longer supported, or
> perhaps
> > has a new name?
>
> still there, same name.
>
> print_r($_SERVER);
Ah, yes. It's there when the page is actually referred from somewhere,
otherwise it's not.
Thanks, Kevin.
Now my simple assignment becomes a conditional assignment to avoid clutter
in the error log:
if ( isset($_SERVER['HTTP_REFERER']) )
$glb_http_ref = $_SERVER['HTTP_REFERER'];
else
$glb_http_ref = "";
instead of
$glb_http_ref = $_SERVER['HTTP_REFERER'];
Learning as I go... :)
Gerry