Re: Send out correct headers for word document

From: Date: Wed, 10 Oct 2001 13:05:17 +0000
Subject: Re: Send out correct headers for word document
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-70651@lists.php.net to get a copy of this message
I attach the headers: URL: localhost/testword.php Content Type: application/ms-word Content Length: 34816 Last Modified: Version: HTTP/1.1 Status Code: 200 Status Text: OK Raw Headers: HTTP/1.1 200 OK Forwarded: Server: Apache/1.3.20 (Win32) Request Method: GET Headers CR/LF: User Agent: GET /testword.php HTTP/1.1 Accept-Language: en Connection: Keep-Alive Content-Type: application/x-www-form-urlencoded User-Agent: HTMLRaw.ocx <sar@writeme.com> Host: localhost Cookie: TrackID=9992579352093921738 I have tried: $fp1 = $tmp; $len = filesize($fp1); header("Content-type: application/ms-word"); header("Content-Disposition: inline; filename=$fp1"); header("Content-Length: $len"); readfile($fp1); and: header( "Content-type: application/ms-word" ); header( "Content-Disposition: attachment; filename=cv-984.doc" ); header( "Content-Description: Word CV Document" ); readfile ($tmp); Neither have worked. Cheers Nic

« previous php.general (#70651) next »