在代码开始出加入一行:

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