Help - Search - Members - Calendar
Full Version: Storing html in Mysql DB
Invision Power Services > Community Forums > Community Web Design and Coding
RedBora
What I want...

- upload a html news page in an /uploads/ directory using ftp
- store the html document in an MySql DB using php (this is not really my problem)
- store the images outside the MySql DB
- create something that displays the contents (also not really the problem)

I am able to read a html file from a location eg /uploads/ and store it in a database. Also displaying it again is not the problem, except for the images offcourse... The html code contains paths like images/myimage01.jpeg

But!
The path differs from the path on the server of course. So I must or change the path to the images in the html code (automatically, using PHP) or I must have a method to tel the system that the images are somewhere else...

I have really no I idea how the change the path in a tag like this: {<img src="images/myimage01.jpeg" width="147" height="203">} ?

Any idea's are welcome !
_
Uh...

CODE
<img src="../images/myimage01.jpeg" style="height: 203px; width: 147px;" />


?

blink.gif
Tseia
You could use a <base href="http://url/" /> so that you can use relative URLs in your <img /> tags original.gif
RedBora
QUOTE(Tseia @ Mar 8 2005, 06:27 PM)
You could use a <base href="http://url/" /> so that you can use relative URLs in your <img /> tags original.gif
*


Thanks Tseia, this is somthing usable I think....

I start experimenting with this one.... flowers.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.