note 30278 added to language.variables.predefined

From: Date: Wed, 12 Mar 2003 20:36:33 +0000
Subject: note 30278 added to language.variables.predefined
Groups: php.notes 
Request: Send a blank email to php-notes+get-45170@lists.php.net to get a copy of this message
If you require access to Predefined Variables in different PHP/ servers versions and don't wish to mess about with how you access them, this little snippet of code might help you: function fn_http_vars_access() { global $GET_VARS, $POST_VARS, $COOKIE_VARS, $SESSION_VARS, $SERVER_VARS, $ENV_VARS; $parser_version = phpversion(); if ($parser_version <= "4.1.0") { $GET_VARS = $GET_VARS; $POST_VARS = $POST_VARS; $COOKIE_VARS = $COOKIE_VARS; $SESSION_VARS = $HTTP_SESSION_VARS; $SERVER_VARS = $HTTP_SERVER_VARS; $ENV_VARS = $HTTP_ENV_VARS; } if ($parser_version >= "4.1.0") { $GET_VARS = $_GET; $POST_VARS = $_POST; $COOKIE_VARS = $_COOKIE; $SESSION_VARS = $_SESSION; $SERVER_VARS = $_SERVER; $ENV_VARS = $_ENV; } } fn_http_vars_access(); -- http://www.php.net/manual/en/language.variables.predefined.php http://master.php.net/manage/user-notes.php?action=edit+30278 http://master.php.net/manage/user-notes.php?action=delete+30278 http://master.php.net/manage/user-notes.php?action=reject+30278

« previous php.notes (#45170) next »