PHP - Two directories up doesn't seem to work -


i have problem concerning direcotries. need include file in php script, , file in folder script. itself, isn't problem, go directory using ../ , work way file. problem occuring when script 2 folders deep , use ../../ , error. here relevant code:

<?php $rootdir = "../../"; ?>

which followed later by:

<?php     include($rootdir . "style/header.inc.php");      include($rootdir . "style/navigation.inc.php"); ?> 

and file located in root\projects\twpweb\ , file trying include located in root\style\

strange thing .css file located in exact same folder , gets accessed in exact same way , work, while include doesn't.

<link rel="stylesheet" type="text/css" href="<?php echo $rootdir ?>style/style.css"> 

any appreciated.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -