Joseph Szobody wrote:
> 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");
> ?>

Include is the statement used for including other php files. That means that
the pdf you're including will be parsed by the parser. I have no idea why
some document don't give errors.

You will have to use readfile instead:

readfile( "../pdfs/whatever.pdf");

HTH
Erwin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to