Last active
July 6, 2020 20:48
-
-
Save alanef/e5df3e60f6a09ef7aa35eb76b3f4198e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| echo '<a href="?go">Download</a>'; | |
| if (isset($_GET['go'])) { | |
| header('Content-Type: text/html; charset=utf-8'); | |
| header('Content-Disposition: attachment; filename="out.pdf"'); | |
| echo file_get_contents("out.pdf"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment