How do I include a file over 2 directories back?


Question

How do you include a file that is more than 2 directories back. I know you can use ../index.php to include a file that is 2 directories back, but how do you do it for 3 directories back? Does this make sense? I tried .../index.php but it isn't working.

I have a file in /game/forum/files/index.php and it uses PHP include to include a file. Which is located in /includes/boot.inc.php; / being the root directory.

1
82
11/13/2011 6:46:08 PM

.. selects the parent directory from the current. Of course, this can be chained:

../../index.php

This would be two directories up.

137
10/2/2008 3:10:07 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon