download successfull... but in binary... why?
| From: | Christian Dechery | Date: | Wed, 09 May 2001 13:32:42 +0000 |
| Subject: | download successfull... but in binary... why? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-52102@lists.php.net to get a copy of this message | ||
I got my script to successfully force the otuput to be redirected to a download
of a new file.
using:
if(stristr($HTTP_USER_AGENT,"MSIE"))
$att="";
else
$att=" attachment;";
header("Content-type: application/download");
header("Content-disposition:".$att." filename=".$filename);
but the problem is, the output is comming as binary... so the '\n' is not
working, instead it'comming as a one giant line with lots of weird chars
instead of '\n'... how do I force it to be in ASCII mode?
and where can I find reference on these header stuff?
. [ Christian Dechery ]
. Webdeveloper @ Tá Na Mesa!
. Listmaster @ Gaita-L
. http://www.tanamesa.com.br