tags:

views:

25

answers:

1

Hi at all, I have a problem, I put into my app a folder (not a group, then folder blue) where I put some image. I read from database an html text that was display on a webviewpage. The problem is when I try to display an image with a

<img src="file:///folder/subfolder/image.png">

the image wasn't display. Until I used a group (using full path) all works great now if I put the image of the folder nothing, not work :(

A: 

Your question isn't too clear, but you should try using relative instead of absolute directories. For example:

<img src="subfolder/image.png">

...if the image is in "folder/subfolder/image.png" and the HTML file in "folder".

Tim Čas
thank you, I'm explain, my database contains a text with some html code then I put the content of the database in a NSString that was print on a webview. The database is on root of app, while the image in a folder.There is'nt any html file but only a database with some html code
Francesco
Well, the directory structure doesn't depends on the location of your database, but whatever document/file/program is displaying the final image. So, if you have a "foo.php" loading the info, the image location will be relative to foo.php.
Tim Čas