PHP中可以用PHP_EOL来替代换行符 PHP中可以用PHP_EOL来替代,以提高代码的源代码级可移植性 echo PHP_EOL; //windows平台相当于 echo "\r\n"; //unix\linux平台相当于 echo "\n"; //mac平台相当于 echo "\r";