Regarding the uploading of images. I am using iluj.jpg as my test image.
File size: 27,568 bytes
I have the following two pages of code:
The first page displays the form:
<form enctype="multipart/form-data" action="imageupload2.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>
the following page, "imageupload2.php", is supposed to move the image into the folder images:
if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {
copy($_FILES['userfile']['tmp_name'], "../images");
} else {
echo "Possible file upload attack. Filename: " . $_FILES['userfile']['name'];
}
The following error message is presented:
"Possible file upload attack. Filename: iluj.jpg"
what am i doing wrong?