利用mb_convert_encoding函数将返回的字符串转码成UTF-8编码 if(! mb_check_encoding($result, 'utf-8')) { $result = mb_convert_encoding($result,'UTF-8',['ASCII','UTF-8','GB2312','GBK']); }
首先是: curl中模拟http请求: curl -l 127.0.0.1:8080/spacobj/core/do?acid=100 -H "token:101hh" -H "Content-Type:application/json;charset=GBK" -X POST -d {"telNum":"13521389587","pass":"'my12345'","nick":"'明天1搜索1er好'","sms":"'7864AQ'"} 注意上方红色的部门,后面格式改成G...