Re: Difference between equal $_SERVER variables?
| From: | Curt Zirzow | Date: | Thu, 24 Jul 2003 14:37:33 +0000 |
| Subject: | Re: Difference between equal $_SERVER variables? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156650@lists.php.net to get a copy of this message | ||
* Thus wrote Ivo Fokkema (I.F.A.C.Fokkema@LUMC.nl):
> Hi list,
>
> Just out of curiosity I would like to know if anyone can tell me the
> difference between some $_SERVER variables that generate the same output (in
> my test-file at least).
>
> For instance, what is the difference between $_SERVER['HTTP_HOST'] and
> $_SERVER['SERVER_NAME']? Can they generate different output under some
> circumstances? They're always the same with me. Any recommendations on which
> to use?
>
> I know that $_SERVER['REQUEST_URI'] can differ from 'SCRIPT_NAME' and
> 'PHP_SELF' (I use 'REQUEST_URI' to see what people were looking for when
> they hit a 404) but can $_SERVER['SCRIPT_NAME'] and $_SERVER['PHP_SELF'] be
> different?
I would suggest reading up on the variables available
http://www.php.net/manual/en/reserved.variables.php
That will answer all your questions.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."