Re: Binary File Download problems.
| From: | Marek Kilimajer | Date: | Fri, 25 Apr 2003 11:15:01 +0000 |
| Subject: | Re: Binary File Download problems. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145245@lists.php.net to get a copy of this message | ||
What headers do you use? Do you use
header("Content-Disposition: attachment; filename=$filename" );
?
Rob Lacey wrote:
Hoping someone can shed some light on this and find a solution. I am currently using a script to send a binary file to the browser by reading the file on the server into a variable (say $data), printing the HTTP Headers and then printing $data the output. This is all fine and well and works as expected. But...it is not possible to visit any other links in that browser until the download has completed. As soon as the download is complete the browser goes to the page you clicked the link immediately. Is there any way to avoid this? I have a similar script written in Perl and this does not happen. But I am trying to be consistant and use PHP for this project. I have established that its not the browser causing the problem, I am thinking it may be PHP / Apache 2.0 oddness. Thanks kindly.