Re: open/save dialog on page load
| From: | dgw at q-logic dot org | Date: | Wed, 12 Jul 2000 22:02:21 +0000 |
| Subject: | Re: open/save dialog on page load | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-6305@lists.php.net to get a copy of this message | ||
If you try and change the content type this way with a .jpg file, internet
explorer seems to ignore the header and displays the image anyway. Netscape
seems to do it properly.
Anybody knows a workaround?
Regards,
David
----- Original Message -----
From: "Hellekin O. Wolf" <hellekin@mmania.com>
To: <php-general@lists.php.net>
Cc: "Ryan Adams" <radams@fcs.uga.edu>
Sent: Wednesday, July 12, 2000 9:28 PM
Subject: Re: [PHP] open/save dialog on page load
> <?php
>
> function save_src($url) {
> header("Content-Type: application/octet-stream");
> readfile($url);
> }
>
> save_src($HTTP_SERVER_VARS["PATH_TRANSLATED"]);
> ?>
>
>
> You can easily change the MIME-Type as needed (e.g.: application/zip or
> application/pdf)
>
> Thank you for pointing me on that problem ;-)
>
> hellekin
>
>
> Ryan Adams wrote:
> >
> > Hi all,
> >
> > How would I cause a php page to bring up the 'open this file from
current location/save file to disk'
> > when a page loads? Like what happens when you click on a zip file or exe
or something. I'm guessing
> > something with header() maybe?
> >
> > Thanks,
> > Ryan
> >
> > --
> > 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
>
> --
> 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
>