File tree;
- boot.php
- panel/index.php
- panel/inc/start.php
- panel/inc/functions.php
Process:
- index.php; requires 'inc/start.php'
- start.php; requires '../boot.php' and 'functions.php'
- (require_once 'x.php' used)
Everything works when index.php called. Why i don't have to use ../../boot.php instead of ../boot.php? If relative folder is /panel, then require 'functions.php' should fail. If it is /panel/inc, require '../boot.php' should fail. But eveything works. How?
Note: I know i should use absolute folder to include files. I am just trying to understand how this example works.