i got 3 files that every one of them is in different folders..
A.php , B.php , C.css .
First , i use A.php to import B.php
A.php:
include ('second_folder/B.php');
second , i use B.php to import C.css :
include ('second_folder/third_folder/B.php');
as you can see , i had to write down “second_folder” cause of the parent file is A.php.
how can i pass the “parenting” from A.php to B.php that i would can be write in B.php like that:
include ('third_folder/B.php');
thank you in advance.
http://php.net/manual/en/function.set-include-path.php
And don’t forget to http://php.net/manual/en/function.restore-include-path.php
Example: