加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

iphone – 使用NSLog打印NSString参数

发布时间:2020-12-15 02:00:02 所属栏目:百科 来源:网络整理
导读:-(void) postToDB:(NSString*) msg{ //print msg NSString *myphp = @"/Applications/MAMP/htdocs/databases/test.php"; NSURL *url = [NSURL URLWithString:myphp]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; [request setP
-(void) postToDB:(NSString*) msg{
    //print msg
    NSString *myphp = @"/Applications/MAMP/htdocs/databases/test.php";
    NSURL *url = [NSURL URLWithString:myphp];
    ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
    [request setPostValue:msg forKey:@"message"];
}

在上述方法中,如何使用NSLog打印“msg”?

非常感谢

解决方法

的NSLog(@ “%@”,MSG);其类型为NSString。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读