Re: Download textfile
| From: | Paul Warner | Date: | Tue, 20 Nov 2001 13:17:56 +0000 |
| Subject: | Re: Download textfile | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-75240@lists.php.net to get a copy of this message | ||
"Arno" <arno@nothing.com> wrote in message
news:20011120124818.61723.qmail@pb1.pair.com...
> When I link a textfile, the textfile is opened in the browser. I want the
> SaveAs box to be shown. Is this possible and if so how to do that?
I apologize for not having a complete answer, but I do have an
explanation that may lead you on the correct path to solve this.
The headers sent at the start of the transfer include the
'Content-Type: text/html; charset = US-ASCII' and this is what
your browser associates with a text file, opening your default
text editor to view. This is what allows Adobe Acrobat files to
spawn the Acrobat reader instead of getting saved to the users
filesystem. I *think* that you need to alter the header to be
'unknown', but I am not sure of the specific syntax or method to
accomplish. Maybe another lister can continue...?
-- Paul