note 98269 added to reserved.variables.globals
| From: | php at caves dot org dot uk | Date: | Sat, 05 Jun 2010 11:16:56 +0000 |
| Subject: | note 98269 added to reserved.variables.globals | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-169903@lists.php.net to get a copy of this message | ||
$GLOBALS does not have indexes _SERVER, _REQUEST or _ENV unless you make reference, somewhere in
your script, to $_SERVER, etc. The following example demonstrates this. Un-comment the lines at the
bottom to see the effect.
echo "_SERVER array is {$GLOBALS['_SERVER']} <BR>";
echo "_GET array is {$GLOBALS['_GET']} <BR>";
echo "_POST array is {$GLOBALS['_POST']} <BR>";
echo "_FILES array is {$GLOBALS['_FILES']} <BR>";
echo "_COOKIE array is {$GLOBALS['_COOKIE']} <BR>";
echo "_REQUEST array is {$GLOBALS['_REQUEST']} <BR>";
echo "_ENV array is {$GLOBALS['_ENV']} <BR><BR>";
//echo "\$_SERVER is $_SERVER<BR>";
//echo "\$_REQUEST is $_REQUEST<BR>";
//echo "\$_ENV is $_ENV<BR>";
----
Server IP: 69.147.83.197
Probable Submitter: 83.104.168.235
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.globals.php
Edit -- https://master.php.net/note/edit/98269
Del: integrated -- https://master.php.net/note/delete/98269/integrated
Del: useless -- https://master.php.net/note/delete/98269/useless
Del: bad code -- https://master.php.net/note/delete/98269/bad+code
Del: spam -- https://master.php.net/note/delete/98269/spam
Del: non-english -- https://master.php.net/note/delete/98269/non-english
Del: in docs -- https://master.php.net/note/delete/98269/in+docs
Del: other reasons-- https://master.php.net/note/delete/98269
Reject -- https://master.php.net/note/reject/98269
Search -- https://master.php.net/manage/user-notes.php