note 41267 deleted from security.globals by aidan

From: Date: Thu, 09 Sep 2004 09:16:21 +0000
Subject: note 41267 deleted from security.globals by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76297@lists.php.net to get a copy of this message
Note Submitter: snobord787 at msn dot com ---- <?php function registered_globals($switch=1){ if($switch){ extract($_REQUEST,EXTR_SKIP); extract($_SESSION,EXTR_OVERWRITE); extract($_SERVER,EXTR_OVERWRITE); extract($_ENV,EXTR_OVERWRITE); extract($_FILES,EXTR_OVERWRITE); }else{ $safelist = array('_GET', '_POST', '_COOKIE', '_SERVER', '_ENV', '_FILES', '_REQUEST', '_SESSION'); foreach(get_defined_vars() as $name => $value) { if (!array_search($name, $safelist)) { unset($$name); } } unset($var_list, $name, $value, $safelist); } } registered_globals(1); // on registered_globals(0); // off ?> that is a little function for turning it on and off manually

« previous php.notes (#76297) next »