Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $file = "reports/".urldecode($_REQUEST['dir'])."/".urldecode($_REQUEST['rep']);
- $len = filesize($file);
- header("Cache-Control: no-store, maxage=1, must-revalidate"); // HTTP/1.1
- header("Cache-Control: post-check=0, pre-check=0", false);
- header("Pragma: public"); // HTTP/1.0
- header("Content-type: application/pdf");
- header("Content-Length: $len");
- header("Content-Disposition: inline; filename=file1.pdf");
- header("Content-Transfer-Encoding: binary\n");
- readfile($file);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement