Re: displaying a pdf
| From: | Jim Giner | Date: | Mon, 30 May 2011 15:01:26 +0000 |
| Subject: | Re: displaying a pdf | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-313240@lists.php.net to get a copy of this message | ||
Thanks for the attempt Simon, but your code only displayed gibberish.
While looking around again for help, I found this and it works perfectly:
<?php
session_start();
//
// Specify the name of the pdf here and the folder
//
$pdfname='VFD_ByLaws.pdf';
$path='/pdfs/';
//
// the rest will handle the displaying
//
header("Cache-Control: no-cache");
header("Content-type: application/pdf");
header("Location:$path$pdfname");
?>