More information about the Underscore mailing list

[_] Content Disposition Header

nik lazell niklazell at gmail.com
Thu Oct 4 14:52:10 BST 2007

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');
?>


Any help much appreciated! Thanks.
Nik