Home >Backend Development >PHP Tutorial > php操作excel或cvs资料的迷惑

php操作excel或cvs资料的迷惑

WBOY
WBOYOriginal
2016-06-13 13:12:12849browse

php操作excel或cvs文件的迷惑?
用php操作cvs或excel(读或写),我记到以前写cvs时编码都要转为gbk,那样有些字符才不会来乱码!是不是像这种文件流的操作都最好转为gbk在执行啊?

------解决方案--------------------
在windows环境中使用gbk自然更省事。当然utf-8应该也是可以的。只不过考虑得要多些。例如bom头..等。当然通过转化编码也可以做到。

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
Previous article: 相关session_id Next article: smarty加载出现有关问题