1<?php
2echo '<a href="FileLink" download="newfilename">Download the pdf</a>';
3//It will work for all kind of file.
4?>
1
2<?php
3// We'll be outputting a PDF
4header('Content-Type: application/pdf');
5
6// It will be called downloaded.pdf
7header('Content-Disposition: attachment; filename="downloaded.pdf"');
8
9// The PDF source is in original.pdf
10readfile('original.pdf');
11?>
12
13