For a while now, the way I've templated my websites is I make a sys_html.php file that contains two functions:
showHeader();
// and
showFooter();
both return html to the user of the layout everything before and after the content.
So when making a webpage all i have to do is:
<?php
session_start();
include_once("sys_html.php");
echo showHeader();
?>
// html etc etc etc
<?
echo showFooter();
?>
The problem is, say I wanted to create a directory for organization called, uh, "products" so like my files would be like
/products/index.php, etc.
If I include "../sys_html.php" then all the image locations get screwed up.
All of my images in sys_html are done this way:
<img src='images/imagewhatever.jpg'>
so that now it TRIES to look for
/products/images/imagewhatever.jpg
and cannot find it. how do i fix this problem so that the images all work?