nginx - ios 访问本地php接口报错
本文介绍了nginx - ios 访问本地php接口报错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
(JSON text did not start with array or object and option to allow fragments not set.) UserInfo=0x175c65b00 {NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}
安卓没有问题 抓包显示我本地数据库关闭错误
上传服务器nginx 没问题 我本地为apache
解决方案
你是使用AF进行请求吗?添加下面语句试试,
self.manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
这篇关于nginx - ios 访问本地php接口报错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文