PHP newline not working in text file

后端 未结 7 447
无人共我
无人共我 2021-02-02 08:41

I am using the PHP code:

$numberNewline = $number . \'\\n\';
fwrite($file, $numberNewline);

to write $number to a file.

For some reason

7条回答
  •  南笙
    南笙 (楼主)
    2021-02-02 08:52

    $numberNewline = $number . '\r\n';

    fwrite($file, $numberNewline);

    Try This

提交回复
热议问题