My setup:
<base directory>
index.php
body.inc
footer.inc
header.inc
<images>
(many files)
<html>
banner.html
equipment.html
main.html
specials.html
<images>
(many files)
- I require_once in index.php the files header.inc, body.inc and footer.inc.
- Body.inc calls variable $content, which are the HTML pages in directory html (equipment.html, main.html, specials.html).
- When the $content is called, my images are goofed up, because body.inc is looking for images in base images directory, NOT html/images where I want it to look.
What I want to do:
Set up a way to force body.inc to search for images in html/images, but stop for footer.inc (so images don't break).
Why I'm doing this:
Keeping all non-editable files out of user hands. HTML directory is editable by user, but the rest is protected.
I tried this, but it doesn't work:
<?
if (eregi('^[<img src="]{10}','')) {
echo "<img src=\"html/";
}
?>