fputcsv和记事本 [英] fputcsv and Notepad

查看:139
本文介绍了fputcsv和记事本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用fputcsv生成csv文件,它工作正常,但当我在记事本(Windows)中查看csv文件没有新行。所有行只在一行,并且应该是linebreak,有一个sqaure(损坏的字符)。 Mac上的其他编辑器例如正确显示断行。

I generate csv files with fputcsv and it works just fine, but when I view the csv file in Notepad (Windows) there is no new lines. All lines are in just 1 line, and where the linebreak is supposed to be, there is a sqaure (corrupted character). Other editors on Mac for example show the lines with breaks correctly.

有什么方法可以解决这个问题,因为CSV需要导入,导入器看不到

Is there any way to fix this problem as the CSV needs to be imported, and the importer does not see the linebreaks as well.

推荐答案

尝试使用Notepad ++处理 \\\

Try using Notepad++ which handles \n newlines more correctly.

另请参阅 fputcsv 文档: http://lv.php.net/manual/en/function.fputcsv.php#90883

这篇关于fputcsv和记事本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆