I am trying to set things up so when we create a testing folder, I can easily change the path to an important file in various places. But, running into an issue.
$folder = "/test";
function foo(){
global $folder;
require_once($_SERVER['DOCUMENT_ROOT'].$folder."/order/includes/db.php");
..do stuff
}
Does not work
function foo(){
require_once($_SERVER['DOCUMENT_ROOT']."/test/includes/db.php");
..do stuff
}
Does work
What am I missing?