title: Get base directory of current script
body: <p>This is the url of my script: <code>localhost/do/index.php</code></p>
  
  <p>I want a variable or a function that returns <code>localhost/do</code> (something like <code>$_SERVER['SERVER_NAME'].'/do'</code>)</p>