title: PHP require_once relative to variable document root
body: <p>I'm trying to include using require_once, however, I don't always know what the file structure will be relative to the DOCUMENT_ROOT...</p>
  
  <p>it could be... 
  /config.php  or /theapp/config.php  or  /dev/theapp/config.php  or /something_else/theapp/config.php</p>
  
  <p>I <em>COULD</em> path back from the file like require_once('../config.php') except in some cases the files may be in a symlink directory.</p>
  
  <p>Basically I'm trying to find a way where NO MATTER the circumstance, any files that call the config.php file can find it.</p>