1.html抬头需加入编码设置标签```<meta charset="UTF-8">```需要注意网页中的php放在body中...2.php编码```header("Content-type: text/html;charset=utf-8");```3.写入mysql编码在php中代码示例:```$mysqli=new mysqli("localhost","root","","xxxx");$mysqli->query("set names utf8;");```4.数据库中相关字段编码设置为“utf8”这些都搞定了编码问题就也搞定啦