我想上传 CSV 文件并将其仅用于导入内容。是否有必要使用 move_uploaded_file 移动临时文件?或者我应该只使用上传的临时文件而不将其移动到特定文件夹中?哪种做法最好?
最佳答案
如果您不需要将文件保存的时间超过要求,则无需移动文件:
The file will be deleted from the temporary directory at the end of the request if it has not been moved away or renamed.
但是如果你想移动上传的文件,你应该使用move_uploaded_file()
对于该操作。
关于php - 上传 CSV 并导入 - 使用临时文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6447104/