Re: Send out correct headers for word document
| From: | Andrey Hristov | Date: | Wed, 10 Oct 2001 12:48:33 +0000 |
| Subject: | Re: Send out correct headers for word document | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70645@lists.php.net to get a copy of this message | ||
I'm not sure but I think that it is:
Header("application/ms-word");
--
Andrey Hristov
Web Developer
IcyGEN Corporation
BALANCED SOLUTIONS
http://www.icygen.com
On Wednesday 10 October 2001 15:36, you wrote:
> Hi all,
>
> I have a directory above my web root containing a load of word documents. I
> want to be able to send them to the client without exposing the directory
> to the user.
>
> I have been trying to use readfile. It works in as much as the correct file
> is being sent. Unfortunalty it is coming out as unformatted rubbish
> because, presumably the headers have not been set to a word document so IE
> is interpretting it as straight text. How do I set the headers to a word
> document type so that the Document is either downloaded or viewed within
> the page?
>
> Cheers
>
> Nic