当我在下面记录 vaule 时responseString
,它总是有随机字符 - 这是 php 问题还是 ios 问题?
NSURLResponse *response;
NSError *error;
NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
NSString *responseString = [NSString stringWithUTF8String:[responseData bytes]];
NSLog(@"%@", responseString);
NSString *success = @"200200";
[success dataUsingEncoding:NSUTF8StringEncoding];
NSLog(@"%lu", (unsigned long)responseString.length);
NSLog(@"%lu", (unsigned long)success.length);
//responseString.length should = success.length but doesn't :(