+
95
-

回答

通过iconv来装换

<?php
$this_php_file_charset = 'utf-8';//代码的编码是UTF-8
$file="Data/test.txt";
$text="I love bfw社区";
$text=iconv($this_php_file_charset,"gb2312",$text);
file_put_contents($file,$text);


网友回复

我知道答案,我要回答