当前位置:Gxlcms > PHP教程 > 透?php?直?android???字串??

透?php?直?android???字串??

时间:2021-07-01 10:21:17 帮助过:7人阅读

我目前是透?php作?媒介,?取?端主?的mySQL?料
?且再?值回??android做?示
在本?端的php做??都很正常
也能正?抓到值?回?
但是?php改成放於?端的php?
????:Value of type java.lang.String cannot be converted to JSONArray

想????是出在哪呢???
本?端??端主?的php路? ?名都是一?的
mySQL的名?和?料表也全部都一?
但??端主??????
如附?所示
?是在本?端?正?的logcat:


回复讨论(解决方案)

Value of type java.lang.String cannot be converted to JSONArray
多半是 BOM 头在作怪

Value of type java.lang.String cannot be converted to JSONArray
多半是 BOM 头在作怪
不好意思 小妹是初?者 ?在是?不透..
可以?大大再?明白一?? 非常感?!!><

?是???端php失?的logcat:
"dayoff":"\u7121\u8cc7\u6599","recommend":"\u56de\u934b\u8089120\u5143\u
04-21 07:31:35.429: E/log_tag(375): org.json.JSONException: Value ? of type java.lang.String cannot be converted to JSONArray

?是??本?端php成功的logcat:
"dayoff":"\u7121\u8cc7\u6599","recommend":"\u56de\u934b\u8089120\u5143\u5ba

你最好给出链接地址给我看看
如果不方便,或不在公网上
那么你可以这样
echo base64_encode(file_get_contents('链接地址'));
贴出结果

你最好给出链接地址给我看看
如果不方便,或不在公网上
那么你可以这样
echo base64_encode(file_get_contents('链接地址'));
贴出结果
???位大大!!:)
我解?了 果然是BOM的??!!><

人气教程排行