php FILE POST upload without save

前端 未结 6 2395
深忆病人
深忆病人 2021-02-18 23:49

I am using a plain text file in a PhP script. Is there any way to process the file in the PhP script without saving it locally? Everywhere I see simply uploading a file and sav

6条回答
  •  执念已碎
    2021-02-19 00:16

    When you upload a file, before you save it locally it get's saved to a temporary file. The location of which can be accessed by:

    $_FILES['uploadedfile']['tmp_name'] 
    

    You can choose not to save the file and fopen() the temporary file, as long as you do this within the same script that recieves the POST.

提交回复
热议问题