relative path - Open file from a different folder in PHP -


let's have 2 folders in php server root directory: "x" , "y". but, in "x" directory there 2 more directories: "a" , "b"! in "/x/a" directory have "index.php" file , in "/y" folder have "stuff.php" file.
"/x/a/index.php" file, want include "/y/stuff.php" file! how do that?
server doesn't allow including files other domains, adding full url doesn't work!
also, i'd know how start path root in php. use "./blabla" index of root , "../blabla" directories in root, but, unfortunately, ".../blabla" doesn't work 2nd grade directories.

to access root begin path "/".

if want go 1 directory currently, e.g. /x/a/ /x/ use "../".

if want go 2 directories (e.g. /x/a/ /) use "../../" (rather ".../" mentioned).


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -