Problem with config. file

I’m trying to create a configuration file in my includes folder so i can create an absolute path for my include files at the top of every page, but I’m doing something wrong. I get this error:

Warning: main(/home/eclip17/public_html_includes/page_top.inc.php4) [function.main]: failed to open stream: No such file or directory in /home/eclip17/public_html/index.php on line 108

Warning: main(/home/eclip17/public_html_includes/page_top.inc.php4) [function.main]: failed to open stream: No such file or directory in /home/eclip17/public_html/index.php on line 108

Warning: main() [function.include]: Failed opening ‘/home/eclip17/public_html_includes/page_top.inc.php4’ for inclusion (include_path=‘.:/usr/lib/php:/usr/local/lib/php’) in /home/eclip17/public_html/index.php on line 108

Here’s what I have in my config. file:

<?php
$includesPath = $_SERVER[‘DOCUMENT_ROOT’].“_includes/”;
?>

and here’s the code on the page I’m getting errors from:

<?php
include “_includes/config.inc.php4”;
?>

…html code… and here is line 108:

<?php
include $includesPath.“page_top.inc.php4”;
?>
can anyone tell me what I’m doing wrong?
Thanks a lot for any help…

WEich1213

Should be:


$includesPath = $_SERVER['DOCUMENT_ROOT']."/_includes/";

$_SERVER[‘DOCUMENT_ROOT’] is without slash at the end.

Thanks a lot!!!