ByetHost server passing html values “Checking your browser” with JSON String

后端 未结 4 1712
眼角桃花
眼角桃花 2020-11-27 05:47

While trying to parse json string to android, HTML values are passed. Before a day all was working good, and suddenly my app start crashing when trying to fetch database wit

4条回答
  •  庸人自扰
    2020-11-27 05:51

    I should add the following as answer as it is the workaround to bypass the above problem. Posting as it might help someone:

    This problem can be solved by simply writing exit(); in the php file at the last executable statement. This will exit the php file and will not append the text. eg.

    $id, 'stkcode'=>$stkcode, 'stkname'=>$comName, 'operatorid'=>$operatorid, 'password'=>$password);
    }
    
    $response['stokist'] = $posts;
    print(json_encode($response));
    exit();
    ?>
    

提交回复
热议问题