I am using PHP to generate a text file that is used in a computer with windows 2000 OS and mozilla firefox browser(its old dont ask why please). The file is generate correctly and runes smoothly on windows 10 and latest version of fire fox.
My problem now is that the new line does not render in the old version(windows 2000 OS and firefox 10)
I have tried using the ff:
1. /n
2. /r/n
3. <br>
4. $string = "This\r\nis\n\ra\nstring\r"; echo nl2br($string);
5. PHP_EOL
All not generating the desired output. It is just appending the BR as text
CODE IS :
header("Content-Type: text/html; charset=UTF-8");
header("Content-Type: multipart/form-data; boundary=something");
header("Content-Length: ".strlen($data)."");
header("Content-Disposition: attachment; filename=".$_GET['name']."");
echo nl2br(base64_decode($data));
sample text is : "Assembly Lot Summary Report " . "\r\n" . "\r\n" ;
FYI
: Notepad(only) is used to open the text file
` will be correctly interpreted). – Daniel Sęk Nov 12 '19 at 08:45