网络编程1

计算机网络
     通过网络连接介质,讲多台计算机和设备连接在一起,组成的计算机系统

 如何通讯
     网络通讯协议
          网络设备通讯的规则

移动互联网应用基本架构

服务器
     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;//接受数据




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值