Re: questions about $_SERVER
| From: | Stuart Dallas | Date: | Mon, 13 Feb 2012 09:10:21 +0000 |
| Subject: | Re: questions about $_SERVER | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316584@lists.php.net to get a copy of this message | ||
On 13 Feb 2012, at 06:28, Rui Hu wrote:
> How PHP sets variables in $_SERVER, say, $DOCUMENT_ROOT? What should I know
> if I want to modify $_SERVER myself?
Once your script starts the superglobals are no different to any other variables, except that
they're in scope at all times.
The only thing you need to bear in mind if you're going to modify them is that other code
that's using them will also see your changes, so beware of knock-on effects.
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/