What is wrong with this image upload
| From: | kermit | Date: | Wed, 09 Apr 2003 04:13:13 +0000 |
| Subject: | What is wrong with this image upload | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-142994@lists.php.net to get a copy of this message | ||
Hello,
I am getting corrupt images images almost double the size. can anyone suggest
what is wrong with the script. here are the html form and php script
thanks
<form name="form1" method="post" action="imgupload1.php"
enctype="multipart/form-data">
<input type="file" name="imagefile">
<input type="submit" name="Submit" value="Submit">
</form>
<?php
echo "HERE " . $_POST["Submit"] ;
if(isset( $_POST["Submit"] )) {
echo "HERE";
echo "TYPE " .$_FILES['imagefile']['type'];
copy ($_FILES['imagefile']['tmp_name'],
"uploadedimages/".$_FILES['imagefile']['name']) or die ("Could
not copy");
echo "TMP " . $_FILES['imagefile']['tmp_name'];
echo "Name: ".$_FILES['imagefile']['name']."<BR>";
echo "Size: ".$_FILES['imagefile']['size']."<BR>";
echo "Type: ".$_FILES['imagefile']['type']."";
echo "Copy Done....";
}
?>
---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more