Line Breaks in dynamic Download

From: Date: Fri, 06 Sep 2002 19:50:29 +0000
Subject: Line Breaks in dynamic Download
Groups: php.general 
Request: Send a blank email to php-general+get-115565@lists.php.net to get a copy of this message
<snip> Again, the new problem is that the Text is not downloading as a file. It is just being printed to the screen. </snip> I tested the following code: <? header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=TEST.txt"); echo "LINE ONE".chr(10)."LINE TWO".chr(10)."LINE THREE"; ?> on a WinNT 4.0 with Apache 1.3.24 and PHP 4.2.3 and did not come across the same issues as you. I was prompted to download or open the file. However, when I did open the file with Notepad it did not contain any line breaks, Wordpad did have the line breaks. HTH Steven

« previous php.general (#115565) next »