Hi
When I try to upload files using the example in the PHP documentation, i get
uploaded files with the first two lines being e.g.:
"
Content-type : image/jpeg

"
How can I remove this mime type from the images that I upload (so I can
perform some manipulation of the images)

The code :
echo "<FORM ENCTYPE=\"multipart/form-data\" ACTION=\"$PHP_SELF\"
METHOD=\"POST\">";
//echo "<FORM ACTION=\"$PHP_SELF\" METHOD=\"POST\">";
echo "<INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"10000000\">";
echo "Send this file: <INPUT NAME=\"userfile\" TYPE=\"file\">";
echo "<INPUT TYPE=\"submit\" name=\"upload\" VALUE=\"upload\">";
echo "</FORM>";

if ($upload) {
echo "Userfile : $userfile<BR>";

if (is_uploaded_file($userfile)) {
copy($userfile, "/tmp/WynnBase.tmp");
} else {
echo "Possible file upload attack: filename '$userfile'.";
}


}





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to