Re: Content Header

From: Date: Fri, 22 Jul 2005 02:51:38 +0000
Subject: Re: Content Header
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-219175@lists.php.net to get a copy of this message
On Thu, July 21, 2005 4:55 am, Chris Shiflett said: > Christopher J. Umina wrote: >> I currently have a script which streams data out of a MySQL database, >> and prints the content headers correctly, however, when I use the >> following line: >> >> header("Content-Disposition: attachment; filename=\"". $filename >> ."\""); >> >> it prompts the user to download the file each time they go to the site. > > Then it works. :-) But it will only work on *SOME* browsers -- those which honor the johnny-come-lately Content-Disposition header. Use Content-type: application/octet-stream to guarantee it gets downloaded in ALL browsers. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#219175) next »