I have a problem concerning direcotries. I need to include a file in my php script, and that file is in another folder than my script. By itself, that isn't a problem, I just go a directory up using ../ and work my way to the file. Then the problem is occuring when my script is two folders deep and I use ../../ and I will get an error. Here is my relevant code:
<?php
$rootdir = "../../";
?>
Which is followed later by:
<?php
include($rootdir . "style/header.inc.php");
include($rootdir . "style/navigation.inc.php");
?>
and the file itself is located in root\projects\TWPWeb\ and the file I am trying to include is located in root\style\
Strange thing is that my .css file is located in the exact same folder and gets accessed in the exact same way and does work, while include doesn't.
<link rel="stylesheet" type="text/css" href="<?php echo $rootdir ?>style/style.css">
Any help will be appreciated.