PHP_EOL
PHP中除去换行符
$str = str_replace(array("\r\n", "\r", "\n"), "", $str);
$str = str_replace(PHP_EOL, '', $str);
换行符
unix系列用 \n
windows系列用 \r\n
mac用 \r
PHP中可以用PHP_EOL来替代,以提高代码的源代码级可移植性
可以用函数get_defined_constants()来获取所有PHP常量
php常量:http://php.net/manual/zh/reserved.constants.php
如果我能一直坚持下去,就像坚持当初的梦想一样,或许我也能成为大神呢,哈哈哈。