note 31378 deleted from security.globals by aidan

From: Date: Wed, 08 Sep 2004 06:04:46 +0000
Subject: note 31378 deleted from security.globals by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76201@lists.php.net to get a copy of this message
Note Submitter: davida at trib dot com ---- Quite a few of the above examples of automatically registering globals ignore the $_FILES (or $HTTP_POST_FILES) superglobal. These are also a little more complex because these are multi-dimensional associative arrays. Before posting a simplified function to register file data, I'll note again that this probably shouldn't be used except to get code working quickly while updating it to use unregistered globals (and even then you're probably better turning global registration on for the site). function registerFiles(){ global $HTTP_POST_FILES; foreach( $HTTP_POST_FILES as $varname => $fileinfo ){ $GLOBALS[$varname] = $fileinfo["tmp_name"]; $GLOBALS[$varname.'_name'] = $fileinfo["name"]; } }

« previous php.notes (#76201) next »