PHP代码中出现中文乱码怎么办?

header("Content-type:text/html;charset=utf-8"); //加上这个就OK

//示例 :
class WechatController extends Controller{
    //put your code here
    public function callback() {
        header("Content-type:text/html;charset=utf-8");
        echo '开发中...';
    }
}
原文地址:https://www.cnblogs.com/qichao123/p/8515545.html