PHP写入WRITE编码为UTF8的文件的实现代码
发布时间:2016-12-29 来源:查字典编辑
摘要:
<?php
$f=fopen("test.txt","wb");
$text=utf8_encode("顨!");
//addingheader
$text="xEFxBBxBF".$text;
fputs($f,$text);
fclose($f);
?>
<?php
$f=fopen("test.txt","wb");
$text=utf8_encode("顨!");
//addingheader
$text="xEFxBBxBF".$text;
fputs($f,$text);
fclose($f);
?>