Home >Backend Development >PHP Tutorial >html - How to get the full local path of the file when uploading it in php
How can PHP obtain the full path of the file when uploading it locally, instead of the storage path after uploading to the server? ? ?
How can PHP obtain the full path of the file when uploading it locally, instead of the storage path after uploading to the server? ? ?
@leandre is right as he said above. It cannot be retrieved. When the front-end uploads a file, it will transfer the file to the server in multipart/form-data
mode in stream
. The server will receive the modified file. After streaming, write the file into a temporary file
(/tmp). All you can operate in the future is this temporary file, which has no connection with the files that exist on the client side.
Cannot obtain this information. The browser will not report it to the server
Is it useful to get this?