note 98269 deleted from reserved.variables.globals by visualmind
| From: | visualmind@php.net | Date: | Sat, 05 Jun 2010 13:59:41 +0000 |
| Subject: | note 98269 deleted from reserved.variables.globals by visualmind | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-169907@lists.php.net to get a copy of this message | ||
Note Submitter: php at caves dot org dot uk
----
$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>";