[H-GEN] Pdf-php puzzle
Clinton Roy
clinton.roy at gmail.com
Mon Sep 27 08:03:00 EDT 2004
Hi Paul,
> My site http://www.qfom.com.au/membership/ has the DocumentRoot line of
> the Apache conf file pointing to a php file, this works very well (as
> you would expect), however, I am using the following lines of php code
> to output the file if it is a pdf file:
I'm just going to pretend that helping IE users is a compatibility
thing, and thus is on topic ;)
> header("Content-type: application/pdf");
I believe that header name should be Content-Type, not Content-type.
As to the actual mime type, you might want to try
application/octet-stream or some such.
> header("Content-Disposition: attachment; filename=".$file);
>From a brief google, I think you should have quotes around that filename:
header("Content-Disposition: attachment; filename="".$file.'"');
> Now this may come as a total surprise to you but it works perfectly in
> firefox but IE produces an error "There was an error opening this
> document. The file does not exist."
I have no access to IE to know if the above suggestions work at all.
What I can tell you is that Google links to microsoft support pages
when asked about content-disposition :)
hth,
--
Clinton Roy
www.humbug.org.au - Brisbane Unix Group
staff.dstc.edu.au/croy - Blog
More information about the General
mailing list