Jquery SyntaxError:JSON.parse:意外字符(仅在Firefox中)

Jquery SyntaxError:JSON.parse:意外字符(仅在Firefox中),jquery,ajax,json,firefox,Jquery,Ajax,Json,Firefox,我试图将参数中的数据解析到数据库中。在IE、Opera、chrome中,一切正常。在Mozilla中,写入错误SyntaxError:JSON.parse:意外字符无效 下面是代码解析: $.getJSON("<?php echo JURI::base()?>ajax.php?get=1&param="+param,function(data){ if(data) {

我试图将参数中的数据解析到数据库中。在IE、Opera、chrome中,一切正常。在Mozilla中,写入错误SyntaxError:JSON.parse:意外字符无效

下面是代码解析:

$.getJSON("<?php echo JURI::base()?>ajax.php?get=1&param="+param,function(data){
                    if(data)
                    {

                buildPopup(data.member_from,data.member_amount);
                            //$("body #scorepopup").fadeIn("slow");
                        var ww = $(window).width();
                        var wh = $(window).height();
                        var spw = $("body #scorepopup").width();
                        var sph = $("body #scorepopup").height();
                        var spt = Math.round(wh/2-sph/2);
                        var spl =  Math.round(ww/2-spw/2);
                        $("body #scorepopup").css("top",0);
                        $("body #scorepopup").css("left",spl);
                        $("body #scorepopup").show();
                        $("body #scorepopup").animate({top:spt+"px"},600, 'easeOutBounce'); 

                    }
                }
)
来自Firefox的ResponseText:

п»ї{"id":"89095","member_no":"89095","username_m":"00047","group_id":"1","dsgid":"31","user_id":"0","member_amount":"91","title":"\u041a\u043b\u0456\u0454\u043d\u0442 dsuser89095","first_name":"dsuser89095","last_name":"\u041a\u043b\u0456\u0454\u043d\u0442","address":"","zip_code":null,"city":null,"county":null,"country":null,"telephone1":"","telephone2":null,"fax":null,"email":"89095ds@ds.com.ua","website":null,"profession":null,"birth_date":"0000-00-00","additional_info":"\u041a\u043b\u0456\u0454\u043d\u0442","member_from":"2013-07-04","member_until":"0000-00-00","committee_info":null,"images":"","last_payment_date":"0000-00-00 00:00:00","suspended":"0","published":"1"}
Firefox一开始的回应是不可读的字符:П»ї

他们来自哪里?可能通过它们在Firefox中不起作用。
如果有任何帮助,我将非常高兴。

“来自Firefox的响应”-这不是来自ajax.php的响应吗?请尝试在两种浏览器中直接点击api url,看看它是否显示在那里。然后开始查看响应标题,以了解数据传输方式的差异interpreted@mishik,是的,来自ajax.php,但仅在Firefox中,您的
ajax.php
脚本中似乎有一个。删除它,一切都会好起来。似乎BOM字符已发送。您的PHP文件是utf-8和/或有utf-8字符吗?如果没有,请将其重新保存到ansi。另外,在

{"id":"89095","member_no":"89095","username_m":"00047","group_id":"1","dsgid":"31","user_id":"0","member_amount":"91","title":"\u041a\u043b\u0456\u0454\u043d\u0442 dsuser89095","first_name":"dsuser89095","last_name":"\u041a\u043b\u0456\u0454\u043d\u0442","address":"","zip_code":null,"city":null,"county":null,"country":null,"telephone1":"","telephone2":null,"fax":null,"email":"89095ds@ds.com.ua","website":null,"profession":null,"birth_date":"0000-00-00","additional_info":"\u041a\u043b\u0456\u0454\u043d\u0442","member_from":"2013-07-04","member_until":"0000-00-00","committee_info":null,"images":"","last_payment_date":"0000-00-00 00:00:00","suspended":"0","published":"1"}
п»ї{"id":"89095","member_no":"89095","username_m":"00047","group_id":"1","dsgid":"31","user_id":"0","member_amount":"91","title":"\u041a\u043b\u0456\u0454\u043d\u0442 dsuser89095","first_name":"dsuser89095","last_name":"\u041a\u043b\u0456\u0454\u043d\u0442","address":"","zip_code":null,"city":null,"county":null,"country":null,"telephone1":"","telephone2":null,"fax":null,"email":"89095ds@ds.com.ua","website":null,"profession":null,"birth_date":"0000-00-00","additional_info":"\u041a\u043b\u0456\u0454\u043d\u0442","member_from":"2013-07-04","member_until":"0000-00-00","committee_info":null,"images":"","last_payment_date":"0000-00-00 00:00:00","suspended":"0","published":"1"}