在代码开始出加入一行:

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

更多推荐

php 设置字符编码为utf-8