title: Getting the URL path to the directory of a file (PHP)
body: <p>Hi<br />
  I have a php file at, say, localhost/foo/foo/bar.php<br />
  which includes a file at localhost/foo/included.php<br />
  I need to be able to get "localhost/foo/" as a string inside included.php<br />
  If, instead of localhost/foo/foo/bar.php, it's localhost/big/burpy/lolz/here.php (still including included.php) I still need to get "localhost/foo/"<br />
  So, I need the path of the <em>included file</em> and not the one that the client requested.</p>
  
  <p>I know when I see the solution I'm going to feel like a doofus, but it just escapes me at the moment. Help please? thanks :)</p>