Try sticking in a
Header("Content-Disposition: attachment; filename=\"$filename\"");
It should work with IE5.5, but it's hard to tell with Internet Explorer as
it changes from version to version.
-------------------------------- - -- - - -
Philip Murray - Senior Systems Engineer
[EMAIL PROTECTED] - Open2View.com
http://www.open2view.com
------------- - -- - -
----- Original Message -----
From: "Santiago Romero" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 13, 2001 10:23 PM
Subject: [PHP] How to force a file download
>
> Hi!
>
> I have some code that outputs (from a php3 cgi) email attachments
> under horde/IMP webmail. I would like ALL attachment (including
> all understood by web browser mime types) to be SAVED to disk,
> and not opened.
>
> I tryed to send them as application/octet-stream but Explorer
> does open them (Netscape treats them correctly and asks me
> to save to disk or open them). Under Explorer, if the output of
> clicking on the "Download attach" link is pure text, it opens
> it directly on the web browser instead of saving it (that's
> what i want! :). On PDFs, it opens acrobat reader, BUT man!,
> I'm passing it application/octet-stream, this should force
> explorer to save it!
>
> Any idea?
> --
> Santiago Romero
> Departamento de Sistemas
> [EMAIL PROTECTED]
>
> Av. Primado Reig 189, entlo
> 46020 Valencia - Spain
> Telf. (+34) 96 332 12 00
> Fax. (+34) 96 332 12 01
> http://www.servicom2000.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]