计算机网络
通过网络连接介质,讲多台计算机和设备连接在一起,组成的计算机系统
如何通讯
网络通讯协议
网络设备通讯的规则
移动互联网应用基本架构
服务器
1.web服务器
2.数据库服务器
开启php cd /etc/apache2/
sudo vi httpd.conf
把包含php字样的..前面的#去掉
然后重新打开apache
sudo apachectl start
---------------------------------------------
同步
url=[NSString stringWithFormat:@"http://10.2.145.162/denglu.php?name=%@&pass=%@",text_name.text,text_pass.text ];
url_u=[NSURL URLWithString:url];
//请求对象
request=[NSURLRequest requestWithURL:url_u];
NSError *error;
NSData *data= [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:&error];//接收返回的数据,然后判断
-----------
异步
遵守
<NSURLConnectionDelegate,NSURLConnectionDataDelegate>两个协议
//实现下列方法.
- (void)connectionDidFinishLoading:(NSURLConnection *)connection ;//处理接受完成的数据
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data;//接受数据