note 34723 added to function.phpversion

From: Date: Tue, 05 Aug 2003 06:19:09 +0000
Subject: note 34723 added to function.phpversion
Groups: php.notes 
Request: Send a blank email to php-notes+get-53385@lists.php.net to get a copy of this message
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']; } ---- Manual Page -- http://www.php.net/manual/en/function.phpversion.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34723 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34723&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34723&report=yes

« previous php.notes (#53385) next »