Re: Send out correct headers for word document

From: Date: Wed, 10 Oct 2001 12:45:24 +0000
Subject: Re: Send out correct headers for word document
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-70647@lists.php.net to get a copy of this message
Andrey, Thanks, I am currently trying this: header( "Content-type: application/ms-word" ); #header( "Content-Disposition: attachment; filename=cv-984.doc" ); #header( "Content-Description: Word CV Document" ); readfile ($tmp); With the #'d sections or without, either does not work and I still just get a garbage output. Any ideas? "Andrey Hristov" <ahristov@icygen.com> wrote in message news:01101015483302.01419@andrey.masq... > 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 >

« previous php.general (#70647) next »