开发者社区 问答 正文

关于从URL读取text文件返回字符串

从我本地服务器中读取的text文件,其中有字符串。

NSString *vers= [NSString stringWithContentsOfURL:[NSURL URLWithString:lnk] encoding:NSUTF8StringEncoding error:nil];

返回的字符串有误,服务器中的数字是1371135679,应用中读取的就是1371133137

展开
收起
爵霸 2016-03-19 11:10:44 2235 分享 版权
1 条回答
写回答
取消 提交回答
  • 最简单的方法是用HTTP缓存,添加?t=<timestamp>request中。

    2019-07-17 19:07:44
    赞同 展开评论
问答标签:
问答地址: