Re: Re: $_SERVER['SERVER_NAME'] in read-only.

From: Date: Thu, 29 Apr 2004 17:33:40 +0000
Subject: Re: Re: $_SERVER['SERVER_NAME'] in read-only.
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-184966@lists.php.net to get a copy of this message
From: "Red Wingate" <redeye@erisx.de> > AFAIK the content of the superglobal variables cannot be changed ( even > though i haven't found this in the docs i can remeber got beaten by PHP > for doing so :-) ) They can be changed and you can even add to them. $_SERVER['foo'] = 'bar'; is valid and now it's a superglobal, too. I wouldn't recommend relying on this, though. If you talking about the users changing the values of of superglobals then that's different. Users can't directly set $_SERVER values, for example, but they can pass values that may influence them. $_SERVER['HTTP_REFERRER'] comes from what the user supplies, for instance, so they are able to manipulate it. A user would not be able to set $_SERVER['SERVER_NAME'] or $_SERVER['PHP_SELF'], though. Which ones are safe or not just takes some research or asking. :) ---John Holmes...

« previous php.general (#184966) next »