I\'ve never seen anything like this.
File structure:
The path used in your includes are not relative to the file the includes are : they are relative to the include_path.
Which means that using relative paths with includes/requires will generally not do what you expect it to...
The solution that's generally used is to work with absolute paths ; this way, you are sure what gets included.
Of course, using absolute paths in your code is bad (it will work on one server, but not another, when your application is deployed to another path) ; so, the solution is to :
The full path to the file you're in can be obtained with __FILE__.
Which means the directory to the current file (the file that instruction is written in) can be obtained with dirname(__FILE__).
After that, it's only a matter of writing the correct paths.
For example, in stuff.php, you'd use :
require(dirname(__FILE__) . "/constants.php");
While, in base.php , you'd use :
require(dirname(__FILE__) . "/../includes/stuff.php");