Re: How to complete a download?
| From: | Bogdan Stancescu | Date: | Tue, 26 Feb 2002 23:35:58 +0000 |
| Subject: | Re: How to complete a download? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-86336@lists.php.net to get a copy of this message | ||
I think a content-length header might prevent this.
$.02
Bogdan
Petras Virzintas wrote:
Hi, if I use the script below, IE either crashes AFTER downloading or just hangs. Is there a correct way of "finishing" a download? I have tried placing empty standard HTML tags at the end. This stops the crashing but adds the actual tags as an extra line to the downloaded file. Thanks in advance Petras <script language="php"> $FileName=$Report.'.csv'; header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"$FileName\""); header("Content-Transfer-Encoding: ascii"); print "123,$456.78,wewewe,sdsdsd"."\r\n"; print "89,$32.10,erererer,asasasas"."\r\n"; </script>