Re: IE5.5 Header Issues
| From: | jeremy brand | Date: | Wed, 03 Jan 2001 18:43:15 +0000 |
| Subject: | Re: IE5.5 Header Issues | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32531@lists.php.net to get a copy of this message | ||
> /normal/path/to/url?foo=bar&fake=filename.ext
>
> ? It might trick IE into thinking that the filename it should be saved
> as is "filename.ext"
I can verify that if IE notices the .ext it will try and handle it
ignoring any mime types that you bothered to set.
> Or if you can use PATH_INFO instead of a query string and do something
> like this:
>
> /normal/path/to/phpfile.php/filename.ext
>
> That would then set PATH_INFO equal to "/filename.ext"
>
> I don't see how IE would know not to save it as filename.ext in this
> case. (you'd think anyway :)
There is supposadly a work around. I saw it fly by the list about 3
weeks ago. It is a custom Content-type: header that IE understands
that has a recommended filename accociated with it. It is not in any
HTTP RFC, but I think it is possibly part of another one.
I don't have time to dig it up, but the answer is out there, try
searching the list archives.
Jeremy
Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html
for more
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"<body>" -- Quoted from Yahoo! homepage, http://www.yahoo.com
>
> -philip
>
> In article <00a401c0759f$6c623840$13011eac@tmiller> you write:
> >I do want it to prompt the user to download I just want it to prompt the
> >user with the filename that's specified, not "index.html" for every
> >requested download. It works in Netscape 4 and 6, but not in IE5. I've also
> >tested it now in IE4, but that doesn't really count since Microsoft has
> >already announced that it won't work properly there, but they claim that it
> >does in IE5. Any other suggestions?
> >
> >----- Original Message -----
> >From: "Blaster" <blaster@videotron.ca>
> >To: "Toby Miller" <tmiller@creativegeneration.com>;
> ><php-general@lists.php.net>
> >Sent: Wednesday, January 03, 2001 9:30 AM
> >Subject: RE: [PHP] IE5.5 Header Issues
> >
> >
> >> The line:
> >> header("Content-Disposition: attachment; filename=$filename");
> >> is to prompt the browser to download the file... So if you don't want the
> >> browser to prompt for a file download, don't put it
> >>
> >> -----Original Message-----
> >> From: Toby Miller [mailto:tmiller@creativegeneration.com]
> >> Sent: Wednesday, January 03, 2001 09:19
> >> To: php-general@lists.php.net
> >> Subject: [PHP] IE5.5 Header Issues
> >>
> >>
> >> I am using the following code:
> >>
> >> <?php
> >>
> >> if (isset($source) && isset($filename)) {
> >> if (filetype($source) == "text/plain") header("Content-Type:
> >> text/plain");
> >> else header("Content-Type: application/octet-stream");
> >>
> >> header("Content-Disposition: attachment; filename=$filename");
> >> header("Content-Length: ".filesize($source));
> >> readfile($source);
> >> exit();
> >> }
> >>
> >> ?>
> >>
> >> This does not work properly in IE 5.5. I don't have another version of IE
> >to
> >> test this with. I get a save dialog box for the file "index.html" every
> >> time. This is the same for all file types. Is this just a bug in IE 5.5 or
> >> is this the same in other versions of IE? If anyone knows the workaround I
> >> would love to see it.
> >>
> >> Thanks,
> >> Toby
> >>
> >>
> >>
> >> --
> >> 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
> >
>
>
>
> --
> 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
>
>