0

I am currently using local web server(using XAMPP).

I am selecting file using input type=file. I want to get the filepath, like if test.txt is on desktop, I should get the path i.e. C:\Users\Admin\Desktop\test.txt.

Is it possible? How? Basically, what I want is client-side path not a server-side .tmp file path.

doge007
  • 1
  • 1

1 Answers1

0

The answer is no.

You are not able to view a file on the clients computer, as that is a huge security issue. Now, in order to get the file and move it, there is a temporary file and position created so you can check and potentionally save it. You can get that file through this code:

$_FILES["UploadFileName"]["tmp_name"]
Nytrix
  • 1,139
  • 11
  • 23