Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $file = file_get_contents('tmp/sample2.pdf');
- if($file)
- {
- header('Content-Type: application/pdf');
- header('Content-Disposition: attachment; filename="tmp/sample3.pdf"');
- header('Content-Length: ' . strlen($file));
- echo $file;
- }else
- {
- echo "File not found";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement