Php ASIHTTPRequest在iPhone SDK上的安装帮助?
我在Xcode中创建了一个新项目,并执行了以下操作以添加ASIHTTPRequest:Php ASIHTTPRequest在iPhone SDK上的安装帮助?,php,iphone,mysql,asihttprequest,Php,Iphone,Mysql,Asihttprequest,我在Xcode中创建了一个新项目,并执行了以下操作以添加ASIHTTPRequest: 已将这些文件复制到主项目文件夹中 ASIHTTPRequestConfig.h ASIHTTPRequestDelegate.h A.h.代表 ASICacheDelegate.h ASIHTTPRequest.h ASIHTTPRequest.m 亚洲数据压缩机 ASIDataCompressor.m ASIDataDecompressor.h ASIDataDecompressor.m ASIForm
- 已将这些文件复制到主项目文件夹中
- ASIHTTPRequestConfig.h
- ASIHTTPRequestDelegate.h
- A.h.代表
- ASICacheDelegate.h
- ASIHTTPRequest.h
- ASIHTTPRequest.m
- 亚洲数据压缩机
- ASIDataCompressor.m
- ASIDataDecompressor.h
- ASIDataDecompressor.m
- ASIFormDataRequest.h
- ASIInputStream.h
- ASIInputStream.m
- ASIFormDataRequest.m
- ASINetworkQueue.h
- ASINetworkQueue.m
- ASIDownloadCache.h
- ASIDownloadCache.m
- ASIAuthenticationDialog.h
- ASIAuthenticationDialog.m
- 可达性.h(在外部/可达性文件夹中)
- Reachability.m(在外部/可达性文件夹中)
- 然后,我将这些文件拖到项目窗口的右侧
- 然后,我开始,项目->编辑活动目标,单击+按钮,然后[问题1]“CFNetwork.framework”不存在?
NSURL *url = [NSURL URLWithString:[[NSString stringWithFormat:@"http://www.mywebsite.com/script.php?first_name=%@",first_name] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request startSynchronous];
NSError *error = [request error];
NSString *response = nil;
if (!error) {
response = [request responseString];
NSLog(@"%@",response);
} else {
return NO;
}
- 我添加了一个新的UIViewController子类文件
- 我像上面那样插入代码,[problem 2]它说“first_name”未定义,还有一系列其他错误。
谢谢!我想您使用的是Xcode4 单击项目导航器中的项目。 项目->选择目标->选择构建阶段->展开将二进制文件与库链接->单击+。您将找到框架
您还没有声明变量的名字。您使用的是哪个版本的Xcode?@Gomathi:Xcode v3.2.6 64位无论如何,您已经解决了这个问题。所以不需要Xcode版本。太棒了!这就解决了,谢谢!现在下一个问题是——我是否只需添加一个新的视图控制器,粘贴到代码中,它就可以运行而不会出现问题?不知道如何解决声明变量或在按原样运行上述程序时可能出现的任何其他问题。再次感谢!