Line break not working when writing to text file in PHP

后端 未结 4 1095
执念已碎
执念已碎 2020-12-03 02:34

I have the following test script:



        
4条回答
  •  一整个雨季
    2020-12-03 03:14

    It is best to use PHP_EOL. This is cross-platform, so it automatically chooses the correct newline character(s) for the platform PHP is currently running on.

    $stringData = "Floppy Jalopy" . PHP_EOL;
    

    PHP Constants

提交回复
热议问题