note 53185 deleted from function.move-uploaded-file by betz

From: Date: Wed, 29 Jun 2005 11:12:15 +0000
Subject: note 53185 deleted from function.move-uploaded-file by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-91123@lists.php.net to get a copy of this message
Note Submitter: ---- I have problem Could any one help me? <form name="frmUpload" enctype="multipart/form-data" action="uploadresult.php" method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="10000000"> <input name="userfile" type="file"></TD> <input type="submit" value="Upload" class="CobaltButton"> onClick="onBack()"> </form> submit the form to the following php program $strFileName = $_FILES['userfile']['name']; $strTemName = $_FILES['userfile']['tmp_name']; $uploaddir = "/home/dqliu/upload/"; $uploadfile = $uploaddir.$strFileName; if ( move_uploaded_file($strTemName,$uploadfile) ) { echo "success!"; } else { echo "fail!"; } When I upload some files, the function returned the valid value. But the file size downloaded at /home/dqliu/upload/ is less than the actual size. Could anyone tell me the possible cause to generate it? Thanks very much.

« previous php.notes (#91123) next »