Re: How to force a file download

From: Date: Fri, 13 Jul 2001 10:54:06 +0000
Subject: Re: How to force a file download
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-57717@lists.php.net to get a copy of this message
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 webmaster@open2view.com - Open2View.com http://www.open2view.com ------------- - -- - - ----- Original Message ----- From: "Santiago Romero" <sromero@servicom2000.com> To: <php-general@lists.php.net> 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 > sromero@servicom2000.com > > 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#57717) next »