I have some deeply nested include files which I need included on some top level pages ie:
/direct/path/to/index.php <---where include is called
/location/of/include.inc
another example
../../../../../index.php
../../include.inc
I need for a script to be run on index.php lookinf recursively folder by folder downwards to find the inlcude.inc. Once the file is found I need for the script to then include the file within the parent.
I have tried a few methods but I can't seem to find one that works efficiently. Thanks guys.
/direct/path/to/index.php <---where include is called
/location/of/include.inc
another example
../../../../../index.php
../../include.inc
I need for a script to be run on index.php lookinf recursively folder by folder downwards to find the inlcude.inc. Once the file is found I need for the script to then include the file within the parent.
I have tried a few methods but I can't seem to find one that works efficiently. Thanks guys.
