note 47481 added to function.extract

From: Date: Wed, 17 Nov 2004 18:44:41 +0000
Subject: note 47481 added to function.extract
Groups: php.notes 
Request: Send a blank email to php-notes+get-80650@lists.php.net to get a copy of this message
If you are working porting an older application, and taking the advice above, extracting only _SERVER, _SESSING, _COOKIE, _POST, _GET, you have forgotten to extract _FILES. Putting _FILES last and using EXTR_SKIP doesn't work because the name of the file upload box is already set as a variable containing only the temporary name of the uploaded file from one of the earlier extracts (I haven't tested to see which one specifically, however). A workaround is to put _FILES last and use EXTR_OVERWRITE. This allows extract to replace that temp-name-only variable with the full array of file upload information. ---- Manual Page -- http://www.php.net/manual/en/function.extract.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47481 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47481&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47481&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47481&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47481&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47481&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47481&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47481&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#80650) next »