Re: Include path (SOLVED)

From: Date: Fri, 23 Jul 2004 20:42:06 +0000
Subject: Re: Include path (SOLVED)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-191687@lists.php.net to get a copy of this message
Hey everyone, ** Have you tried $_SERVER['DOCUMENT_ROOT'].'/'; ** Matt, DAMN! THATS what I was looking for. No, didnt try that, took the long route home instead, but atleast brushed up on php's "explode" function. ** $baseDir = $_SERVER["DOCUMENT_ROOT"]; $templatesDir = $baseDir . "/templates/"; include($templatesDir . "header.php"); include($templatesDir . "body.php"); include($templatesDir . "footer.php"); ** Ed, perfect. ** Have you tried; Include "../templates/header.php"; ** Warren, yep, tried that and also "../../templates/header.php"; and more, it was going to the root ("/home/sites/" etc) Thanks, everyone. Cheers, -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!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail

« previous php.general (#191687) next »