My file upload script is not working. Can anyone help?
This is only part of my script, but I think it's the only part with problems:
>$uploadDir = '/uploadedfiles/';
$uploadFile = $uploadDir . $_FILES['file']['name'];
if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadFile))
{
print "File is valid, and was successfully uploaded. ";
}
else
{
print "There was an error uploading the file. Please try again.";
print_r($_FILES);
exit;
}
This is the error I get, as well as my programmed error
Warning: move_uploaded_file(/uploadedfiles/1210_14_2_web.jpg): failed to open stream: No such file or directory in /home/tcecom/public_html/upload2.php on line 56
Isn't this a problem with the server. Do I need to change permissions? Thanks