PATH // Take a path from root and turn it into a relative path. function root($path) { return $GLOBALS['depth'] . $path; } // ------------------------------------- include(root("config.php")); require_once root("vendor/autoload.php"); include(root("res/lib/string.php")); include(root("res/lib/array.php")); include(root("res/lib/user.php")); include(root("res/lib/post.php")); include(root("res/lib/comment.php")); include(root("res/lib/db.php")); $loader= new Twig_Loader_Filesystem(root("res/themes/default/html")); $twig = new Twig_Environment($loader, ['cache' => root('cache/')]); ?>