1

As the title says. How can i download a file off a network drive? I currently have this, it opens the file in my Internet Explorer browser but it's supposed to download it. (Or give the option to open or download). $search is the input given by the user.

<a type="button" class="UitslagKnop" href="file:\\\\domain\map\map\map\map\<?php echo $search; echo '_REV_'; echo $Revlv2; echo '_uitslag';?>.dxf" download><span>Uitslag</span></a>
Max Theuws
  • 25
  • 7

1 Answers1

2

You don't need the file:\\ in the href of the link. Testing your code locally doesn't initiate the download like you're attempting, but removing that prefix in the href does. Simply use:

<... href="\domain\map\map\map\map\<?php echo $search.'_REV_'.$Rev1v2.'_uitslag';?>.dxf" ...>
  • The code you are sending works if i have the files stored in the sitemap. But doesn't work when i try to access a network drive. – Max Theuws Jun 06 '18 at 15:17
  • @MaxTheuws Ahh, my apologies, try this out: https://stackoverflow.com/questions/37020583/php-read-or-copy-file-from-a-network-drive-window – Brian Pluhar Jun 06 '18 at 18:04