416 liens privés
The PHP_EOL constant, which is automatically set to the correct line break for the operating system that the PHP script is running on.
Notepad only knows about "\r\n". So really the only solution is to not use Notepad or to use what it wants. Linux programs are typically smarter and will know how to parse "\r\n" even though they really just want "\n". The best solution depends on who these files are for, etc.
Don't use PHP_EOL for text-file output.
IIRC it's better to use "\r\n" for best compatibility.
You can DEFINE or $var it if you want.
define PHP_EOL "\n"
define('CR', "\r"); // Carriage Return: Mac
define('LF', "\n"); // Line Feed: Unix
define('CRLF', "\r\n"); // Carriage Return and Line Feed: Windows
define('BR', '<br />' . LF); // HTML Break
\n is a Linux/Unix line break.
\r is a classic Mac OS (non-OS X) line break. Mac OS X uses the above unix \n.
\r\n is a Windows line break.
- "�" : encodé en ISO, affiché en UTF-8.
- "é" : encodé en UTF-8, affiché en ISO.
- "" : encodé en WINDOWS-1252, affiché en UTF-8 (généralement).