Newlines are missing after downloading txt file through the browser
<p>I have a txt file that is generated on the server and contains newlines. If I view the file in my ftp editor, they are here. If I download it through my ftp client and open in it windows with notepad, I also see the newlines.</p>

<p>But when I try to download it through the browser by forcing a download window, and then open the file, all the new lines are suddenly gone.</p>

<p>This is the code I have now. I also tried to set the content type to application/force-download, but that also made no difference.</p>

<pre><code>header('Content-Type: text/plain');
header('Content-Disposition: attachment; filename="'.$myFile.'"');
header("Content-Transfer-Encoding: binary");
</code></pre>

<p>Any idea why the new lines are only missing when I download it through the browser? But are intact when I view the file on the server, or download it from the ftp and the open in notepad?</p>
