2008/08/14

Disable PHP register_globals

Code for disable PHP register_globals in PHPWind forum:
if(ini_get('register_globals')){
   foreach($GLOBALS as $key=>$val){
      if(!in_array($key,array('GLOBALS','_POST','_GET','_COOKIE','_SERVER','_FILES','wind_in'))){
         ${$key}='';
      }
   }
}

沒有留言:

張貼留言