Having the same hierarchy:
/* file1.php */
$var = "foo";
/* file2.php */
I get the following:
file1.php // $var is available and file2.php is included
file2.php // $var is not available; $GLOBALS['var'] is available; file3A.php and file3B.php are included
file3A.php // $var is not available; $GLOBALS['var'] is available;
file3B.php // $var is not available; $GLOBALS['var'] is available;
In the real application I'm not having access to the vars if not through $GLOBALS, is that because I must pass references to all set vars to the function?, if that's so, how could I go around this without that function?
I basically need to let files have access to any file in anyway without loosing references. Thanks for replying.