加入BOM头即可

fwrite($fp,"\xEF\xBB\xBF");

参考:http://justcoding.iteye.com/blog/1668308

04-28 12:21