iphone read txt file from UIWebView
I can read the data in file.txt file located in local disk.
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"file" ofType:@"txt"];
NSString* 开发者_StackOverflow社区Data = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:&error ];
now, I upload the file.txt file into a website. how can i read the data from the txt file now from UIWebView?
Please help!!
The similar way:
NSString* Data = [NSString stringWithContentsOfURL:fileURL usedEncoding:NSUTF8StringEncoding error:&error ];
精彩评论