PHP File Upload, files disappearing from /tmp before move_uploaded_files

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

    1) Are the post_max_size and upload_max_filesize holding higher value than the size of the file you are trying to upload?

    2) Does your uploading script take longer time to execute than the value of the max_execution_time variable allows?

    3) I assume your uploading script doesn't consume as much memory as the memory_limit variable allows. When the client is uploading the file to the server, then the server is probably holding some of it in memory while doing so. I'm not sure if it somehow affects the limit of the memory_limit variable in php.ini.

    These variables can be changed in php.ini and/or .htaccess or with ini_set().

    Hope that helps.

    0 讨论(0)
  • 2021-02-13 03:39

    be careful with your $upload_file. it might have been lack of a "/" when you concatenated folder path and name of file uploaded.

    0 讨论(0)
提交回复
热议问题