PHP read from uploaded text file?

后端 未结 3 1783
抹茶落季
抹茶落季 2021-01-31 03:25

If I upload a text file via a form, is it possible to output its contents directly from the $_FILES variable rather than saving it onto the server first? I know this is a secur

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-31 03:47

    The file is saved to temp directory the moment it's uploaded, but you can use $_FILES['uploadedfile']['tmp_name'] to read it without having to save in a permanent place.

提交回复
热议问题