define('__ROOT__', dirname(dirname(__FILE__))); //call define untill you get to the root directory require_once (__ROOT__."/Path/To/File.php"); //append __ROOT__ to the string