PHP写入WRITE编码为UTF8的文件的实现代码
<?php
$f=fopen("test.txt", "wb");
$text=utf8_encode("顨!");
// adding header
$text="\xEF\xBB\xBF".$text;
fputs($f, $text);
fclose($f);
?>
/php/20578.htmlwww.phpzy.comtrue/php/20578.htmlTechArticlePHP写入WRITE编码为UTF8的文件的实现代码 ?php $f=fopen("test.txt","wb"); $text=utf8_encode("顨!"); //addingheader $text="\xEF\xBB\xBF".$text; fputs($f,$text); fclose($f); ?...
PHP之友评论