/**
* Automatically determine the PHP version and convert all environment variables to global variables
*
* @author Avenger
* @version $Id 2003-05-18 13:01:14 $
*/
Function Pmyoutput (& $a) {
if (Is_array ($a)) {
Array_walk ($a, ' pmyoutput ');
} else {
$a = stripslashes ($a);
$a = Str_replace (' "', '" ', $a);
}
}
Function Pmyinput (& $a) {
if (Is_array ($a)) {
Array_walk ($a, ' pmyinput ');
} else {
$a = addslashes ($a);
}
}
/*
if (Phpversion () < ' 4.1.0 ') {
Isset ($HTTP _session_vars)? $GLOBALS [' _session '] = & $HTTP _session_vars: ";
Isset ($HTTP _server_vars)? $GLOBALS [' _server '] = & $HTTP _server_vars: ";
Isset ($HTTP _env_vars)? $GLOBALS [' _env '] = & $HTTP _env_vars: ";
Isset ($HTTP _files_vars)? $GLOBALS [' _files '] = & $HTTP _files_vars: ";
if (GET_MAGIC_QUOTES_GPC () = = 1) {
Isset ($HTTP _get_vars)? $GLOBALS [' _get '] = & $HTTP _get_vars: ";
Isset ($HTTP _post_vars)? $GLOBALS [' _post '] = & $HTTP _post_vars: ";
Isset ($HTTP _cookie_vars)? $GLOBALS [' _cookie '] = & $HTTP _cookie_vars: ";
} else {
Isset ($HTTP _get_vars)? Pmyinput ($HTTP _get_vars): ";
Isset ($HTTP _post_vars)? Pmyinput ($HTTP _post_vars): ";
Isset ($HTTP _cookie_vars)? Pmyinput ($HTTP _cookie_vars): ";
$GLOBALS [' _get '] = & $HTTP _get_vars;
$GLOBALS [' _post '] = & $HTTP _post_vars;
$GLOBALS [' _cookie '] = & $HTTP _cookie_vars;
}
$GLOBALS [' _request '] = Array_merge ($_get, $_post, $_cookie);
} else {
if (GET_MAGIC_QUOTES_GPC ()! = 1) {
Isset ($_get)? Pmyinput ($_get): ";
Isset ($_post)? Pmyinput ($_post): ";
Isset ($_cookie)? Pmyinput ($_cookie): ";
Isset ($_request)? Pmyinput ($_request): ";
}
}
*/
?>
http://www.bkjia.com/PHPjc/317457.html www.bkjia.com true http://www.bkjia.com/PHPjc/317457.html techarticle PHP/** * Automatically judge PHP version and convert all environment variables to global variables * * @authorAvengeravenger @php.net * @version $Id 2003-05-1813:01:14$ */ Functionpmyoutput (nbsp;{if (Is_array ...