PHP File Upload, files disappearing from /tmp before move_uploaded_files

前端 未结 14 1989
独厮守ぢ
独厮守ぢ 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:35

    I was just having this issue as well, came across this website for a solution - did not get it tho ;)

    I was getting the correct info when viewing print_r($_FILES) but was unable to execute move_uploaded_file...

    I solved the issue by checking the $upload_file path attribute in the move_uploaded_file function - make sure it is correct otherwise it will not work (mine was incorrect).

    Also, the file in the temp location gets removed automatically, I think that is the way PHP works.

    I hope this helped.

提交回复
热议问题