|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-10-30 10:34 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 16:00:01 2025 UTC |
If "FILE1" is a posted file and it is zero bytes in length, the following code will die with a "Failed - none" message: $tmpfile = $HTTP_POST_FILES["FILE1"]["tmp_name"]; if (!is_uploaded_file($tmpfile)) { die ("Failed - " . $tmpfile); } Not only does it fail, it leaves a zero-byte "php" temporary file behind in /tmp. But if the file is non-zero in length, it does not fail, and the temporary file is automatically deleted at exit. I can reproduce this with IE 4.01sp1, IE 5.5, and Netscape 4.75. My HTML which calls the upload script looks like this: <form method="POST" action="/doupload.php" ENCTYPE="multipart/form-data"> <input type=file name="FILE1" size=60> <input type=submit value="Upload File"> </form>