解決php輸出中文亂碼問題
1、php頁面輸出亂碼
方法一
設置php.ini字符集,修改【default_charset = "UTF-8"】
方法二
在php文件開頭設置默認字符集
header("Content-Type: text/html;charset=utf-8");
2、html頁面輸出亂碼
設置html頁面字符集
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
解決php輸出中文亂碼問題
1、php頁面輸出亂碼
方法一
設置php.ini字符集,修改【default_charset = "UTF-8"】
方法二
在php文件開頭設置默認字符集
header("Content-Type: text/html;charset=utf-8");
2、html頁面輸出亂碼
設置html頁面字符集
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>