lets say I have four PHP files as such:
www/global.php
<?php
function doAwesomeStuff() {}
www/child1.php
<?php
include ("global.php");
function Something1() {}
www/child2.php
<?php
include ("global.php");
function Something2() {}
www/subdirectory/grandchild.php
<?php
include ("../global.php");
include ("../child2.php");
function Something3() {}
I run into the problem of including global twice in one case, but if we keep getting complicated, the include's are calling directory paths relative to the called file, not the included file, which is a real pain logically.
Any solutions to this?