views:

214

answers:

2

I can read the data in file.txt file located in local disk.

NSString *filePath = [[NSBundle mainBundle] pathForResource:@"file" ofType:@"txt"];
NSString* 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!!

A: 

The similar way:

NSString* Data = [NSString stringWithContentsOfURL:fileURL usedEncoding:NSUTF8StringEncoding error:&error ];
kovpas
yeah!!thanks!!!
Ni
A: 

You should start accepting answers to your questions, or nobody will have interest in answering to them.

kovpas