I need some help with symlinks. I've setup a structure (dots used to show structure) like this:
httpdocs (directory)
.....logo.jpg (file)
.....header.php (symlinked file)
.....index.php (symlinked file)
.....footer.php (symlinked file)
.....pages (symlinked directory)
..........phpfiles
...............file.php
In order to get this structure inside of that root httpdocs folder, I did individual symlinks to header.php, index.php, and footer.php. Then I just symlinked to the pages directory, which makes everything underneath it available as well. My problem is that from file.php I cannot do a php include("../../header.php") because when php goes two directories down to look for it, it looks starting from where the actual file is. I did some poking around and discovered this is only true when the file I'm trying to do the include() from is just brought in as part of a symlinked directory. If I individually symlink the file, it works just fine.
Is there a way around this? I have too many files to symlink them individually by hand. How could I get PHP to go through a directory and create and individual symlink to each file inside of it?
Thanks for the help!