Hi, I'm new to PHP and found the following code for downloading a file from website.
header("Content-Description: File Transfer");
header("Content-Disposition: attachment; filename=$tofile");
It works fine except that all CR LF are removed and the text appears just as one large block (after being downloaded). The file is a simple text file '.txt'. Tried it on a simple text file created in notepad and this has the same effect. THe file on the server is fine as have downloaded it via FTP and appears as it should. Tried a few variations using type of 'text' etc. but still same issue. Same effect in IE and Chrome. Help gratefully received. Thanks J