doue9730
2011-05-07 01:03
采纳率: 100%
浏览 82

iPhone - 异步调用php页面并确保它已加载

In one of my apps, I'd like to call asynchronously a php page I have written (http://serveradress/page.php?date=20111231), and I would be sure to know if the page could be called (no 404 error, php server down, customised 404 page, missing internet connection, or some things like that). I've planned for that to make the php page return a very simple HTML page with just "OK" in its body or title.

This would be a "phantom" call without use of any UIWebView, or if REALLY nedded, a hidden UIWebView but I'd prefer to avoid this.

Could you help me to write this call ?
And be sure to know if it has been loaded ?

I saw that I should probably use NSURLConnection, but I'm a little bit lost.

Could you help me ?

图片转代码服务由CSDN问答提供 功能建议

在我的一个应用程序中,我想异步调用我编写的php页面(http:// serveradress / page.php?date = 20111231),我肯定知道是否可以调用页面(没有404错误,php服务器关闭,自定义404页面,缺少互联网连接或类似的东西)。 我已经计划让php页面返回一个非常简单的HTML页面,其主体或标题只有“OK”。

这将是一个“幽灵”调用而不使用任何 UIWebView,或者如果真的是一个隐藏的UIWebView,但我宁愿避免这种情况。

你能帮我写这个电话吗?
一定要知道它是否可以 已经加载?

我看到我应该使用NSURLConnection,但我有点失落。

你能帮帮我吗? / p>

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题