note 34722 deleted from reserved.variables by didou

From: Date: Tue, 05 Aug 2003 07:54:46 +0000
Subject: note 34722 deleted from reserved.variables by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-53391@lists.php.net to get a copy of this message
Note Submitter: info@gieson.com ---- If you must contend with an old version of PHP that doesn't recognize $_REQUEST here is the code to overcome that. if($_SERVER['PHP_SELF']){ $legacy = FALSE; } else { $legacy = TRUE; $_REQUEST = array(); $serverVars = get_defined_vars(); $AargvA = explode("&", $serverVars['argv'][0]); for($i=0;$i<sizeof($AargvA);$i++){ $AargvB = explode("=", $AargvA[$i]); addArray($_REQUEST, $AargvB[1], $AargvB[0]); } } function addArray(&$array, $id, $var){ $tempArray = array($var => $id); $array = array_merge ($array, $tempArray); } if($legacy){ $phpSelf = $HTTP_SERVER_VARS['PHP_SELF']; } else { $phpSelf = $_SERVER['PHP_SELF']; }

« previous php.notes (#53391) next »