Can someone please help me understand why this works?
I have 3 files settings.php, inc.php, and index.php
The inc.php is in a directory under the root of the site called inc
Settings.php and index.php are both in the root of the site
settings.php
$_PATH = "/home/site/";
inc.php
require_once("settings.php);
function getdata()
{
}
index.php
require_once($_PATH."/inc/inc.php");
Now if index.php requires $PATH to get to the inc.php, and $PATH is not set until settings.php... How can it ever find the inc.php?
I know this is kind of confusing but I'm confused...
Thanks
PHPdev