I have a problem. Since hours I try to get a upload script working. I also read some other questions on stackoverflow but nothing helped. The webspace allows file_upload and the size of the file is not too large. The directory where to move the downloads exists, too. My html code is:
Upload: <input type="file" name="file">
And my PHP code is:
if ($_FILES['file']['error'] == 0) {
$tmp_name = $_FILES["file"]["tmp_name"];
$name_file = $_FILES["file"]["name"];
move_uploaded_file($tmp_name, "upload/" . $name_file);
}
I echoed $_FILES and the file was in there and there was no error. Everytime I try to upload the file (I also tried to upload other files and file types) move_uploaded_file returned false.
EDIT: The folder is writeable now.