php inlcude path problem (I think)
Posted by: OriginalMacBabe
Posted on: 2007-05-24 14:08:00
I am trying to use php include to add header, footer, and navigation to my site.
I used this code:
In reply to:
<div id="main_nav">
<?php include("../includes/main-nav.php";) ?>
</div>
but I got this when I tried to load my page:
In reply to:Parse error: syntax error, unexpected T_STRING in /home/.sada/ellen/ellenseyes.com/index.php on line 1
I am thinking that it just doesn't know where to find my files. I tried having them in the same directory, and specifying the directory with a full path, but the error message remains the same.
I don't know what the ".sada" is, but since it is above the level of my sites's directory, I'm guessing that the include function is looking for my files too high in the structure.
How am I to correctly specify my include files, which I want to house in a directory named "includes"?
What have I done wrong?