Where does PHP save temporary files during uploading?

前端 未结 8 1427
情书的邮戳
情书的邮戳 2021-02-07 05:50

I am using XAMPP on Windows. By printing $_FILES[\"file\"][\"tmp_name\"], it seems that the temporary file was saved at C:\\xampp\\tmp\\phpABCD.tmp. But I cannot se

相关标签:
8条回答
  • 2021-02-07 06:35

    Use move_uploaded_file(file, path), specify the file and the path where you want to store the file.

    A copy of that file is created and gets stored.

    0 讨论(0)
  • 2021-02-07 06:38

    Note that the file is saved binary in $_FILES["file"]["tmp_name"], so you may open it maybe with file_get_contents if it is an image or something like this...

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