Force downloadable
Force downloadable file with php
Copy this code and paste it in your HTML
<?php
//Link to download file with <a href="download.php" target="_blank">Download</a>
header('Content-disposition: attachment; filename=huge_document.pdf'); header('Content-type: application/pdf'); ?>
Report this snippet
Comments
Subscribe to comments