页面乱码总结

1.html页面出现乱码

<meta charset="utf-8">


2.php页面出现乱码

header("Content-Type: text/html; charset=utf8");


3.php中添加 html 并且html中加入js乱码:

html中添加    <meta charset="utf-8">       

js中添加       <script type="text/javascript" src="./js/ZaoPanCeLue_to.js" charset="utf-8"></script>

php中还必须加      header("Content-Type: text/html; charset=utf8");

posted @ 2022-12-06 22:22  轻风细雨_林木木  阅读(27)  评论(0编辑  收藏  举报