igaofen

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

首先把内容编码,再追加\xEF\xBB\xBF

$fp=fopen("text.txt", "w+");
$text = iconv('gb2312', 'utf-8', "中国");
// adding header
$text="\xEF\xBB\xBF".$text;
fputs($fp, $text);
fclose($f);

posted on 2009-06-22 14:40  igaofen  阅读(168)  评论(0编辑  收藏  举报