How would you set the image path when including templates? The goal is to allow the designer to open the html template, make their edits and save and the php code would bring it in and display it. The problem is images, take this html template:
Now bringing up the html template in an html editor shows the image correctly but bringing it into the root of the folder in php shows a broken image:
Hi there! <img border="0" src="../images/smiley.gif">
Well the image folder is in the root of the php file so the image path is invalid. I cant have the editors use the full url path because the domain might be different. Do I have to write a script that rewrites all relative paths with the absolute path when building the template on the php side?