一个文件两种编码,写个临时脚本处理下就好了
header("content-type:text/html;charset=utf-8");
function fileUTF8($file,$niceFile){
$fp=file_get_contents($file);
$data = explode("\r",$fp);
$myfile = fopen($niceFile,'w');
foreach ($data as $key=>$value){
$value = str_replace(" ",',',$value);
fwrite($myfile,$value);
}
fclose($niceFile);
}
fileUTF8('./llyqq.txt','nice.csv');
网友评论