Re: IE5.5 Header Issues

From: Date: Wed, 03 Jan 2001 18:35:13 +0000
Subject: Re: IE5.5 Header Issues
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32528@lists.php.net to get a copy of this message
I haven't tried this, but what if you made your URL look somethine like this: /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" 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 :) -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 >

« previous php.general (#32528) next »