php設置頁面編碼的方法:在php mvc的控制器里面或php頁面輸出meta標簽,代碼為【echo '<meta http-equiv="content-type" content="text/html; charset=utf-8"】。
php設置頁面編碼的方法:
1、在php mvc的控制器里面或php頁面輸出meta標簽
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8">';在php頁面或html頁面
<meta http-equiv="content-type" content="text/html; charset=utf-8">2、使用header函數(shù)
在控制器或頁面里面加入語句:
header("content-type:text/html; charset=utf-8");想了解更多編程學習,敬請關注php培訓欄目!