Global. php .? Php *** automatically determines the PHP version and converts all environment variables to global variables *** @ authorAvengeravenger@php.net * @ version $ Id2003-05-1813: 01: 14 $ * functionpmyoutput (nbsp; {if (is_array /**
* Automatically determines the PHP version and converts all environment variables to global variables.
*
* @ Author Avenger
* @ Version $ Id 13:01:14 $
*/
Function pmyoutput (& $ ){
If (is_array ($ )){
Array_walk ($ a, 'pmyoutput ');
} Else {
$ A = stripslashes ($ );
$ A = str_replace ('"', '"', $ );
}
}
Function pmyinput (& $ ){
If (is_array ($ )){
Array_walk ($ a, 'pmyinput ');
} Else {
$ A = addslashes ($ );
}
}
/*
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 ['_ cooker'] = & $ 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 ['_ cooker'] = & $ 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.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/317457.htmlTechArticle? Php/*** automatically determines the PHP version and converts all environment variables into global variables ** @ authorAvengeravenger@php.net * @ version $ Id2003-05-1813: 01: 14 $ */functionpmyoutput (nbsp; {if (is_array...