CSV new Line Character

廉价感情. 提交于 2019-11-30 23:19:44

PHPs file functions do not reliably recognize line endings from Macs (if they use \r character, as Mac Excel does, if I recall correctly.)

You need to set auto_detect_line_endings in php.ini to true, then it will properly recognize line endings, whether they are \n, \r, or \r\n.

This setting is PHP_INI_ALL, which means that it can be set anywhere, i.e., in php.ini, in .htaccess for a particular directory, or even with ini_set, e.g., ini_set('auto_detect_line_endings', true)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!