Displaying PDF file
| From: | Joseph Szobody | Date: | Thu, 12 Sep 2002 14:38:21 +0000 |
| Subject: | Displaying PDF file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-116157@lists.php.net to get a copy of this message | ||
I've made a website for a real estate appraiser, who wants to put all his appraisals for his
clients online. I have stored these PDF documents in a folder outside of the webserver folder, for
security. When a client successfully logs in and clicks the link to biew the PDF, I have a PHP
script that does the following:
<?
Header("Content-type: application/pdf");
include("../pdfs/whatever.pdf");
?>
It worked great at first, and still does with some PDF documents. With others, it gives says
something like...
Parse error: parse error in /path/to/pdfs/whatever.pdf on line 410
Why does it work with some PDF docs, and not others? Is there a better way to display PDF files
(without putting them in a web-accessible folder)?
Thanks,
Joseph