Re: How do I open Save As Dialog Box?
| From: | Torsten Roehr | Date: | Mon, 23 Aug 2004 15:34:02 +0000 |
| Subject: | Re: How do I open Save As Dialog Box? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194476@lists.php.net to get a copy of this message | ||
"Php Junkie" <phpjunkie@mjimm.com> wrote in message
news:BD4F7920.17EE%phpjunkie@mjimm.com...
> Ave,
>
> I'm facing a little problem.
> I have created a File Manager Application for my company which has a place
> where authorized users can download the stored files. The files are of
> various MIME Types.. Mainly PDF, TXT & DOC.
> What I want to do is basically... When the user clicks on the Download
> Button... The Save As Dialog Box should appear...
> What is happening right now is that the file opens in it's related
software
> (Word, Acrobat, Notepad etcetera). I don't want the file to open in it's
> native software.
>
> I know I need to use the
> header ("Content-type: application/octet-stream");
> But I don't know how.
>
> Can anyone help?
>
> Thanks.
Take a look at PEAR's HTTP_Download:
http://pear.php.net/package/HTTP_Download
This package is exactly what you are looking for.
Regards, Torsten Roehr