note 91862 added to reserved.variables.files

From: Date: Mon, 29 Jun 2009 23:51:37 +0000
Subject: note 91862 added to reserved.variables.files
Groups: php.notes 
Request: Send a blank email to php-notes+get-157681@lists.php.net to get a copy of this message
For some reason when I tried to check if $_FILES['myVarName'] was empty() or !isset() or array_key_exists(), it always came back that the file was indeed in the superglobal, even when nothing was uploaded. I wonder if this is a result of enctype="multipart/form-data". Anyways, I solved my issue by checking to make sure that $_FILES['myVarName']['size'] > 0 ---- Server IP: 69.147.83.197 Probable Submitter: 71.134.248.140 ---- Manual Page -- http://www.php.net/manual/en/reserved.variables.files.php Edit -- https://master.php.net/note/edit/91862 Del: integrated -- https://master.php.net/note/delete/91862/integrated Del: useless -- https://master.php.net/note/delete/91862/useless Del: bad code -- https://master.php.net/note/delete/91862/bad+code Del: spam -- https://master.php.net/note/delete/91862/spam Del: non-english -- https://master.php.net/note/delete/91862/non-english Del: in docs -- https://master.php.net/note/delete/91862/in+docs Del: other reasons-- https://master.php.net/note/delete/91862 Reject -- https://master.php.net/note/reject/91862 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#157681) next »