Image Uploads beeing corupted

From: Date: Wed, 28 Nov 2001 08:12:58 +0000
Subject: Image Uploads beeing corupted
Groups: php.general 
Request: Send a blank email to php-general+get-75857@lists.php.net to get a copy of this message
Hey guys, I got my uploads to work thanks to some peoples help here in this newsgroup.... but now im having a problem with the files beeing corrupted upon upload..... not sure why.... any help would be greatly apreciated. I have included my code again if it helps any. <----------------------------------------> function UploadImage(){ global $HTTP_POST_FILES; global $ImageFile; reset($HTTP_POST_FILES); $pic_file = $HTTP_POST_FILES['ImageFile']; copy ($pic_file['tmp_name'], "../images/$ImageFile_name"); } <FORM ACTION="<?php $SCRIPT_NAME ?>" Method="Post" ENCTYPE="multipart/form-data" > <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000"> <Input Type="File" Name="ImageFile"> <Input Type="Submit" Name="Submit"> </FORM> <----------------------------------------> I've found that just doing this seems to do the same function UploadImage(){ global $ImageFile; copy ($ImageFile, "../images/$ImageFile_name"); } Thanks Ryan Stephens

« previous php.general (#75857) next »