Re: Serving out a file to Firefox ... headers?
| From: | Travis Doherty | Date: | Fri, 24 Nov 2006 05:32:21 +0000 |
| Subject: | Re: Serving out a file to Firefox ... headers? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245111@lists.php.net to get a copy of this message | ||
Brian Dunning wrote:
> Sorry to revisit this issue YET ONE MORE TIME... :) :)
>
> My online store sends out the file for download upon purchase. Below
> are the headers I send, and I understood that it should work for all
> browsers. It does not work for Firefox. Suggestions?
>
> header('Content-Type: application/octet-stream');
> header('Content-Disposition: attachment; filename='.$filename);
> $size = filesize('../../store/files/'.$filename);
> header('Content-Length: '.$size);
> readfile('../../store/files/'.$filename);
>
Pretty sure Richard already squared this one away, I think this is the
article you are looking for:
http://richardlynch.blogspot.com/
Travis