Hey all,
I'm having a problem when I try to upload a file to a script. This is the
html file:
<form ENCTYPE="multipart/form-data" action="file.php" method="post">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="30720">
<INPUT TYPE="hidden" name="task" value="upload">
<P>Banner bestand:
<br><INPUT NAME="the_file" TYPE="file" SIZE="35"><br>
<input type="submit" Value="Upload">
</form>
This is the content of file.php:
$the_path = "/dir/to/image/uploads";
$registered_types = array(
"image/gif" => ".gif",
"image/pjpeg" => ".jpg, .jpeg",
"image/jpeg" => ".jpg, .jpeg");
$allowed_types = array("image/gif","image/pjpeg","image/jpeg");
if (isset($task) && strstr($task, "upload"))
{
if ($the_file == "none")
{
exit();
}
copy($the_file, $the_path . "/" . $the_file_name);
}
The problem is, when I hit the upload button, I get a 404 file error or file.php
never loads at all. I'm 100% sure the action url is correct. Anybody know
what could be causing this?