global.php_php Tutorials

Source: Internet
Author: User
/**
* 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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.