Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(): Failed opening '/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php' for inclusion (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24
utf8 bom – unethost無限空間虛擬主機 技術分享部落格

如何將 utf8 + bom 轉為 utf8 的編碼格式

關於檔案編碼的問題,我們之前在”網頁文件的編碼狀況
提過如果是特殊編碼,檔案開啟時不能隨意破壞其編碼,
否則會導致亂碼。

今天遇到一個很特殊的狀況,原以為是單純的utf8問題,
其php程式的編碼使用了utf8 + bom,
上傳至主機後,瀏覽器的讀取都會出現亂碼,
無論是修正php.ini或是mysql都是異常。
這時需要手動去調整,強制使用utf8而不是使用utf8+bom,
所以來介紹幾種調整的方式:

閱讀全文 如何將 utf8 + bom 轉為 utf8 的編碼格式