Hi, I'm trying to use a file upload script, but it doesnt' seem to work.
I have a file containing this:
<form enctype="multipart/form-data" action="take.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>
And the take.php file contains this:
<?php
if (is_uploaded_file($userfile)) {
echo $userfile;
copy($userfile, "\bleh");
} else {
echo "Possible file upload attack: filename '$userfile'.";
}
?>
I already created the "bleh" folder inside the folder in wich these two files are.
Actually when I upload the file, I don't get any error message or anything, but then when I look in the "bleh" folder, the file isn't there.
Can anyone help?