<?php // В PHP 4.1.0 и более ранних версиях следует использовать $HTTP_POST_FILES // вместо $_FILES. $uploaddir = '/var/www/html/uploads/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); echo '<pre>'; /* if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "Файл корректен и был успешно загружен.\n"; } else { echo "Возможная атака с помощью файловой загрузки!\n"; }*/ echo 'Некоторая отладочная информация:'; print_r($_FILES); print "</pre>"; ?> Where is the file?
Variable in php.ini
upload_tmp_dir no value Maybe after setting this variable, the file will actually be in a temporary folder? OR is there any parameter php that automatically "does the cleaning"?
BUT if you uncomment the code (moving to the folder ... uploads) the code will work without errors. The file will be in ... uploads.
links:
upload strange browser behavior
Is the downloadable file in the temporary folder after the script ends?
Where does the server upload? (there is no file in the temporary folder). upload_tmp_dir
