note 40346 deleted from security.globals by aidan

From: Date: Wed, 08 Sep 2004 06:04:22 +0000
Subject: note 40346 deleted from security.globals by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76200@lists.php.net to get a copy of this message
Note Submitter: frog-man at phpsecure dot info ---- Here is a way of simulating the register_globals option ON when it is OFF, without overwriting globals variables : <?php if (!ini_get("register_globals")){ foreach ($_REQUEST as $k=>$v){ if (!isset($GLOBALS[$k])){ ${$k}=$v; } } } ?> It could be used to apply a filter on the REQUEST variables entered by the user. This will work too : <?php extract($_REQUEST,EXTR_SKIP); ?> but without possibility of filter.

« previous php.notes (#76200) next »