PX : code

Register Globals by John Craig
Download this code


<?php

# check if the directive is OFF
if(!ini_get("register_globals")){
  
# define the super globals to process
  
$__SUPER_GLOBALS = array("_ENV""_GET""_POST""_SERVER");
  
# process each required super global
  
foreach($__SUPER_GLOBALS as $__SUPER_GLOBAL){
    while(list(
$__var$__val) = @each(${$__SUPER_GLOBAL})){
      global ${
$__var};
      ${
$__var} = $__val;
    }
  }
}

?>

Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.