看板 PHP 關於我們 聯絡資訊
我想使用fopen來建立utf-8編碼的檔案 但我不知道該怎麼設定... $string = "測試"; $fp = fopen("test.txt","w"); fwrite($fp,$string); fclose($fp); 這樣會是ANSI而非utf-8.. 那如果想讓他出來的檔案格式為utf-8該怎作呢?用iconv嗎? 感謝^^" -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.135.8.145
sonicjr:iconv("BIG-5","UTF-8",$string); 01/03 13:11