phpmyadmin 亂碼的解決之道- for Joomla!1.0.15
這是一個教學文件,只適用於新安裝裝Joomla!1.0.15中文版者。可解決安裝完之後,phpmyadmin亂碼的問題。
- 你的mysql環境必需在mysql4.1以上。
- 請在local端使用xampp、appserv等軟體測試後,再實行。
- 測試軟體所提供的mysql、php版本,儘量和實際運行的伺服器(或虛擬主機)一樣。
1.新建一個「Joomla10」資料庫,設定好使用者權限,編碼與校對設為utf8。


2.將主程式按平常的步驟解壓縮,放在網站目錄下。在開始安裝之前更改以下二個檔案,這樣安裝完後,在phpmyadmin看資料庫時,才不會亂碼。
主程式的 /include/database.php 檔案
尋找
//@mysql_query("SET NAMES 'utf8'", $this->_resource);
更改為
mysql_query("SET NAMES 'utf8'", $this->_resource);
存檔。
主程式的 /installation/install2.php 檔案
尋找
$sql = "CREATE DATABASE `$DBname`";
更改為
$sql = "CREATE DATABASE `$DBname` CHARACTER SET utf8 COLLATE utf8_general_ci";
存檔。
上傳並覆蓋上述二個檔案。
3.按一般程序建立Joomla站,與「Joomla10」資料庫連接。

4.這時去看phpmyadmin的編碼,是正常的。若沒有改上述二個檔,會在phpmyadmin看到亂碼,但前台是正常的。

5. 若你不在意phpmyadmin是否是亂碼,也可以不改,因為負負得的結果,網站的顯示是正常的。若是以長久考量,對於日後轉移主機與升級會比較方便!
相關文章:

Loading...
Social Links
Thank you for taking the time to read this post. We hope you've enjoyed the
content here. Please feel free to use the links below to share this post with others.