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
Line endings per OS
Unix / Linux \n
\n
DOS / Windows \r\n
\r\n
Invalid \r and \n\r
\r
\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.
PHP_EOL