title: Determine root directory of application
body: <p>I am having a bit of trouble with relative path in php.  Within one of my classes I have the following code:</p>
  
  <pre><code>$iniPath = $_SERVER['DOCUMENT_ROOT'] . "/movies/config.ini";
  $ini_array = parse_ini_file($iniPath, true);
  </code></pre>
  
  <p>This code works perfectly because it returns "/var/www/movies/config.ini".</p>
  
  <p>But the problem is the code isn't transportable.  If its installed on another server they may not install it in /movies/.</p>
  
  <p>tl;dr  How do I specify application directory as root directory in php?</p>