File tree;
Process:
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.
As for the PHP manual:
http://php.net/manual/en/function.require-once.php
http://www.php.net/manual/en/function.include.php
If a path is defined — whether absolute (starting with a drive letter or \ on Windows, or / on Unix/Linux systems) or relative to the current directory (starting with . or ..)
When PHP includes / requires a file, it looks for a path relative to the current file position.