json_decode问题

今天在编码过程当中 post返回的json数据,json_decode的时候为null,json_last_error()返回为4. 根据排查(字符串长度)发现返回的字符串的长度比本身看到的字符串长度长3.基本上肯定是BOM的问题 找到问题解决方案就是对post或者get返回的数据进行去除BOM. 下面是去除函数 function removeBom($contents){ $charse
相关文章
相关标签/搜索