I'm trying to set up a web page to allow some indicator file downloads. **** Now solved *****
I'm trying a php script to ensure the files are downloaded, not displayed....
This works well, but when the file name starts with #, it does not work.
I've never used php before, so there maybe a simple thing I'm not doing.
Any suggestions appreciated.
I'm trying a php script to ensure the files are downloaded, not displayed....
Inserted Code
<?php $file = $_GET['file']; header ("Content-type: octet/stream"); header ("Content-disposition: attachment; filename=".$file.";"); header("Content-Length: ".filesize($file)); readfile($file); exit; ?>
Inserted Code
<a href="direct_download.php?file=file name">Download the file</a>
This works well, but when the file name starts with #, it does not work.
I've never used php before, so there maybe a simple thing I'm not doing.
Any suggestions appreciated.
Holy Grail part 1. - Cut loses short.