[_] Content Disposition Header
Matt Kane
ascorbic at gmail.com
Thu Oct 4 15:00:26 BST 2007
On 4 Oct 2007, at 14:52, nik lazell wrote:
> Hi,
>
> Quick question for the PHP peeps out there...
> I'm trying to force a download of a PDF, and it's working fine on a
> mac, and in FF on a PC - but IE is returning the following:
>
> "internet explorer was not able to open this Internet site. The
> requested site is either unavailable or cannot be found. Please try
> again later."
>
>
> Here's my php:
>
> <?php
> header('Content-type: application/pdf');
> header('Content-Disposition: attachment; filename="my_file.pdf"');
> readfile('my_file.pdf');
> ?>
>
Dunno if it's the cause, but the filename shouldn't be quoted.
--
Matt Kane, Lead Developer, Clementine
http://www.clevr.com/
http://www.clementine.info/
Clementine is a trading name of Sphex LLP