PHP New Line will not work

前端 未结 3 1634
鱼传尺愫
鱼传尺愫 2020-12-07 04:16

Hi I am trying to create some code that first reads the existing contents of the file in and then adds the new line of code on a new line but the code i am using just adds i

3条回答
  •  不知归路
    2020-12-07 04:59

    Line endings per OS

    Unix / Linux
    \n

    DOS / Windows
    \r\n

    Invalid
    \r and \n\r


    The value of PHP_EOL constant depends on the platform php is running on.
    It doesn't detect the line-endings in the current file or anything magic.

提交回复
热议问题