note 34723 deleted from function.phpversion by didou
| From: | didou@php.net | Date: | Tue, 05 Aug 2003 07:55:00 +0000 |
| Subject: | note 34723 deleted from function.phpversion by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53392@lists.php.net to get a copy of this message | ||
Note Submitter:
----
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'];
}