I have some simple code that I have running on CentOS running Apache with PHP. I try to upload and I keep getting:
"Sorry, there was a problem uploading your file." when I try to upload anything.
Do I have a permissions problem or something wrong?
The files below are in/var/www/html/
And I have a folder called upload in /var/www/html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<form enctype="multipart/form-data" action="upload.php" method="POST">
Please choose a file: <input name="uploaded" type="file" /><br />
<input type="submit" value="Upload" />
$target = "upload/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
echo "Sorry, there was a problem uploading your file.";