org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject

后端 未结 5 2200
孤独总比滥情好
孤独总比滥情好 2020-11-29 11:11

I m trying to do a registration page from an android activity connectiong the datas to my sqldatabase, I m getting this error \" org.json.JSONException: Value

First of

5条回答
  •  春和景丽
    2020-11-29 11:20

    You should set Content-Type header before sending back the response.

    header('Content-Type: application/json');
    print(json_encode(array("message" => $msg)));
    

    Check this : Returning JSON from a PHP Script

提交回复
热议问题