Is it possible to have one include directory and access it from sub directories?
I’ll try to explain a little better. If I have the following code:
[code=php]
$file_name = “file_to_access”;
include ($file_name);
OK! That’s simple. I know! If I want to access this file but it is in a directory outside of the current one (I need to back out of current, not inside current), what do I write???
I know I will have to change the file name to include said directory but I can’t figure out how to back out of a directory.
In HTML, if you want to back out, you do something like:
[code=html]
“../previous_directory/file_inside.html”
By using “../” this backs you out – Can you do this with the PHP function include();?