|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-04-23 01:08 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 11:00:02 2025 UTC |
When running this code: ##-- upload_test1.html --## <html><head><title>upload test</title></head> <body> <FORM ENCTYPE="multipart/form-data" METHOD="POST" ACTION="upload_test2.php"> <input type="hidden" name="MAX_FILE_SIZE" value="1000000"> <INPUT TYPE="FILE" NAME="vita" SIZE="30" MAXLENGTH="58"> <INPUT TYPE="submit" NAME="update" VALUE="Commit Changes"> <INPUT TYPE="RESET" NAME="Reset" VALUE="Reset Changes"> </form> </body></html> ##-- upload_test2.php --## <?php if ($HTTP_POST_FILES['vita']['tmp_name'] != 'none') { echo "a file was uploaded"; } else { echo "nothing was uploaded"; } ?> Different results depending on the browser one is using. If one uses Galeon 1.2.0 under Linux or Mozilla 0.99 under linux, and one presses the "commit" button WITHOUT uploading a file, the resulting page will display "a file was uploaded". This is due to the fact that tmp_name is equal to "" instead of "none" which it is supposed to be equal to. If one does upload a file, using galeon, tmp_file does get defined as it should. /vjl/