i 设有一个与数据库连接的站点网页,并在考虑到GET参数的情况下从一个桌上检索数据。
* 选自彩色 =美元_GET[color ;
我想形成一线电话,要求该页面(接收参数),并检索该数据,供我使用。
如何这样做?
感谢!
i 设有一个与数据库连接的站点网页,并在考虑到GET参数的情况下从一个桌上检索数据。
* 选自彩色 =美元_GET[color ;
我想形成一线电话,要求该页面(接收参数),并检索该数据,供我使用。
如何这样做?
感谢!
可通过<>NSURLConnection检索URL的数据。 您提供<条码>NSURLRequest,并将努力在背景中查找数据。 采用代表制方法,你可以应对失败或成功。
您可设立<条码>。
//color is your color object
NSString *url = [NSString stringWithFormat:@"http://www.yoursite.com/yourpage.php?color=%@",color];
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];
最简单的办法是使用
NSString *url = [NSString stringWithFormat:@"http://www.yoursite.com/yourpage.php?color=%@",color];
NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]];
由于有了<代码>NSURLRequest,你必须做一些更多的魔术才能获得实际数据。
如果你想要从NSData获得一个NSString,就使用
NSString *response = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
// ...
[response release]; // do this somewhere or you ll have a mem-leak!
I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...
HI, In our application i am using corelocationframework when opening application a alert for allow and dont allow.when clicking on the allow for current location we will show current location.When ...
Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...
我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......
我希望我与四舍五入的累进角进行网上讨论。
我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。
We have a restaurant table that has lat-long data for each row. We need to write a query that performs a search to find all restaurants within the provided radius e.g. 1 mile, 5 miles etc. We have ...
I like to write bash shell scripts on my iPhone, put them in an app folder with an icon, plist, etc., so they execute like apps by tapping their icon on SpringBoard. This is not interactive like ...