Send out correct headers for word document

From: Date: Wed, 10 Oct 2001 12:36:52 +0000
Subject: Send out correct headers for word document
Groups: php.general 
Request: Send a blank email to php-general+get-70644@lists.php.net to get a copy of this message
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 (#70644) next »