[thelist] Problem with PDF Download via PHP
Tony Grimes
info at scribenewmedia.com
Wed Dec 24 12:16:36 CST 2003
My users are getting "File not Found" errors from Acrobat when they try to
open PDFs "from their current location" via my PHP redirect script. The Word
documents are downloading fine. Here is the page with the downloads:
http://www.caplacanada.org/downloads.php
Here is the relevant code I'm using for the download script:
<code>
header("Content-type: $mime_type"); //$mime_type == application/pdf
header("Content-Length: $file_size");
header ("Content-Disposition: attachment; filename=".$file_name );
readfile($full_path);
</code>
Does anyone know of a better way to do this? I tried sending a generic
octet-stream mime type, but that didn't work. Is this an issue with IE or
Acrobat?
Any help would be appreciated.
Tony
More information about the thelist
mailing list