<?
header("Content-Type: text/plain; name=file.txt");
header("Content-disposition: attachment; filename=file.txt");
echo "line1\nline2\nline3\nline4";
exit;
?>
The problem is, that when you download and open the file(with notepad) the whole text is on one line. Is there a way to make it so each line will be different?
I tried
<?
header("Content-Type: text/plain; name=file.txt");
header("Content-disposition: attachment; filename=file.txt");
echo "
line1
line2
line3
line4";
exit;
?>
Without success also. It's all on one line, and little squares splicing the different lines.
header("Content-Type: text/plain; name=file.txt");
header("Content-disposition: attachment; filename=file.txt");
echo "line1\nline2\nline3\nline4";
exit;
?>
The problem is, that when you download and open the file(with notepad) the whole text is on one line. Is there a way to make it so each line will be different?
I tried
<?
header("Content-Type: text/plain; name=file.txt");
header("Content-disposition: attachment; filename=file.txt");
echo "
line1
line2
line3
line4";
exit;
?>
Without success also. It's all on one line, and little squares splicing the different lines.