PHP File Upload, files disappearing from /tmp before move_uploaded_files

前端 未结 14 2007
独厮守ぢ
独厮守ぢ 2021-02-13 03:09

I have a very basic upload script, probably lifted straight off the php.net/move_upload_files function page.

move_uploaded_file() is failed because it canno

14条回答
  •  南笙
    南笙 (楼主)
    2021-02-13 03:27

    Are you 100% sure that the file actually is created in /tmp? If you don't have write permission (or the user the script runs as) the file wont be written to /tmp but (I'm guessing) you'll see it during the upload although it's not actually there when the upload finishes.

    Edit: $_FILES['file']['error'] - Value: 7; Failed to write file to disk. Introduced in PHP 5.1.0. So check your PHP-version. If it's below 5.1 write to disk might be your problem.

提交回复
热议问题