note 23702 added to language.variables.predefined
| From: | php-general at lists dot php dot net | Date: | Thu, 25 Jul 2002 12:55:42 +0000 |
| Subject: | note 23702 added to language.variables.predefined | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-33545@lists.php.net to get a copy of this message | ||
If your PHP version is older then 4.1.0 and want to run a script that is written for a version above
4.1.0 (where the names of the superglobals changed) you can use the code below to make them
available
if(version_compare(phpversion(),'4.1.0','<') {
$_POST = &$HTTP_POST_VARS;
$_GET = &$HTTP_GET_VARS;
$_SESSION = &$HTTP_SESSION_VARS;
$_SERVER = &$HTTP_SERVER_VARS;
$_COOKIE = &$HTTP_COOKIE_VARS;
$_FILES = &$HTTP_POST_FILES;
$_ENV = &$HTTP_ENV_VARS;
}
--
http://www.php.net/manual/en/language.variables.predefined.php
http://master.php.net/manage/user-notes.php?action=edit+23702
http://master.php.net/manage/user-notes.php?action=delete+23702
http://master.php.net/manage/user-notes.php?action=reject+23702