OGeek|极客世界-中国程序员成长平台

标题: php - 制作网络服务后如何在IOS应用程序中获得有效的json回复 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 10:48
标题: php - 制作网络服务后如何在IOS应用程序中获得有效的json回复

创建网络服务后,我的 JSON 响应如下

$response['success']=1;
$response['message']='enter successfully';
die(json_encode($response));

但是当我在 iOS 应用程序中运行它时,会出现以下错误

JSON text did not start with array or object and option to allow fragments not set



Best Answer-推荐答案


您的 json 响应无效。请检查您的 json 对象。

关于php - 制作网络服务后如何在IOS应用程序中获得有效的json回复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32524384/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4