Home  >  Article  >  Backend Development  >  PHP_EOL

PHP_EOL

WBOY
WBOYOriginal
2016-06-20 12:54:341011browse

PHP_EOL

根据平台系统的不同,转换成不同的系统换行符。
系统 换行符
Windows \r\n
Linux \n
Mac \r
例如:
<br />// 转义浏览器输入的换行符$str = str_replace(PHP_EOL, '<br>', $str);
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn