-1

Is it possible to on click event open computer directory using PHP.

<body>
    <a href="file://C:/Users/Pictures/">Link Text</a>
</body>
Grant
  • 2,413
  • 2
  • 30
  • 41
prakash kumar
  • 237
  • 1
  • 2
  • 12

1 Answers1

0

yes, you can open files in browsers but keep in mind each browser has its own way to handle such urls. Old Internet Explorer 8 in Windows 7 opens links in Windows Explorer, but other most new browser use their embedded interface for same.

<a href="file:///C:/Users/">Link to test data</a>

also take a look here to see how to create paths for directories in proper way: https://blogs.msdn.microsoft.com/ie/2006/12/06/file-uris-in-windows/

Galzor
  • 825
  • 8
  • 16