RE: [PHP] Stream download problem
| From: | Kristen G. Thorson | Date: | Wed, 21 Jun 2006 15:50:54 +0000 |
| Subject: | RE: [PHP] Stream download problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-238475@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Michael Satterwhite [mailto:michael@weblore.com]
> Sent: Tuesday, June 20, 2006 8:32 PM
> To: PHP Users
> Subject: [PHP] Stream download problem
>
> I have a site that generates a file to be streamed down. The relevant
> code is:
> ----------------------------------------------------------
> header("Content-type: application/vnd.ms-excel");
> header("Content-disposition: attachment; filename=$EXPORT_TIME.txt");
> header("Content-disposition: attachment");
You're overwritting the Content-disposition header with one that doesn't
supply a suggested filename. The first Content-disposition header is
not being sent at all, so IE is guessing at a filename. Take a look at
the headers your browser is receiving. You'll probably find that's
what's going on.
kgt