0

I have project in which I'm trying to link to a local file, e.g.

<a href="C:\Users\TM******\OneDrive - Xgroup\Pictures\Screenshots>Click to open folder</a>

I've tried many methods and am now out of ideas.

I've already tried to change the link that connects to the server but still doesn't work.

DarkBee
  • 16,592
  • 6
  • 46
  • 58
  • Hello Noor, You are willing to connect localhost with server means how ? Kindly explain more also you mentioned that you tried many methods then please share your code so that we can get more clarity – Hetal N May 12 '23 at 04:58
  • A web page can't link to the local file system. – Teemu May 12 '23 at 05:17
  • the files stored on (\\server01\Installer For MS\Noor\01. RFID Application). the localhost I using now is (http://localhost/Master_Application/Dashboard.php). when user click one of the link on webpage localhost, it should be enter the address file server. but it not work. – Noor Hidayah May 12 '23 at 06:49

1 Answers1

0

You cannot load files from your local file system in a web page served from a web server due to security reasons. Your localhost doesn't know it is on your file system and likewise your file system doesn't know the address localhost is itself, it gets treated as a separate web server.

If you move the file you want to reach into a directory on your localhost, the problem should be resolved.

Apodemus
  • 579
  • 2
  • 19