I saw in previous contributed notes that in content-disposition the file is not a quoted-string, there is no problem if the filename have no spaces but if it has in IE it works but in Firefox not. The RFC 2616 puts as an example this: Content-Disposition: attachment; filename="fname.ext" You can see http://www.faqs.org/rfcs/rfc2616.html section "19.5.1 Content-Disposition" for more details. The correct header then is this:
header("Content-Disposition: attachment; filename=\\"$filename\\"");
[http://us.php.net/readfile]