$baseDir = $_SERVER["DOCUMENT_ROOT"]; $templatesDir = $baseDir . "/templates/";
include($templatesDir . "header.php"); include($templatesDir . "body.php"); include($templatesDir . "footer.php"); > :-) > > Good solution, but the problem is once the program is > completed it goes out of my hands and most prolly the > client wont know the exact paths, the templates folder > would *always* be one below...but the path before the > /templates will change. > > Anyway, heres what I have come up with, comments are > welcome: > > $pieces = explode("/", $_SERVER["PATH_TRANSLATED"]); > $a=count($pieces); > $f=""; > for($i=1; $i < $a-2; $i++) > {$f=$f.$pieces[$i]."/";} > $include_path= "/".$f; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php