--- Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > /home/sites/site80/web/articles/myfile.php > > from "myfile.php" I want to include "header.php" > which > is located in: > > /home/sites/site80/web/templates/ > > /* > > eg: > /home/sites/site80/web/articles/myfile.php > /home/sites/site80/web/templates/header.php > > */ > [/snip] > > in /home/sites/site80/web/articles/myfile.php > > place the following line.... > > include > "/home/sites/site80/web/templates/header.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; -Mag ===== ------ - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __________________________________ Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php