class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
more info about the class
$this->log .= '- ' . _("no image processing wanted") . ''; if (!$this->no_upload_check) { $result = is_uploaded_file($this->file_src_pathname); } else { $result = TRUE; } if ($result) { $result = file_exists($this->file_src_pathname); if ($result) { $result = copy($this->file_src_pathname, $this->file_dst_pathname); if (!$result) { $this->processed = false; $this->error = _("Error copying file on the server. Copy failed"); } } else { $this->processed = false; $this->error = _("Error copying file on the server. Missing source file"); } } else { $this->processed = false; $this->error = _("Error copying file on the server. Incorrect source file"); }
//$result = move_uploaded_file($this->file_src_pathname, $this->file_dst_pathname); //if (!$result) { // $this->processed = false; // $this->error = _("Error copying file on the server"); //}
and uncomment the following:
Then try uploading a file which is not an image (or an image, but with no image processing), and tell me if it works.