php fopen utf8文件

$file=fopen(filename.'.php',"w+");
fwrite($file,$page_body);//如果保存为txt文件文件格式为ansi,必须加这个bom头,"\xEF\xBB\xBF".保存的格式才为utf8,如果保存为php文件则格式为utf8
fclose($file);

猜你喜欢

转载自www.cnblogs.com/IsSshuai/p/10837559.html