Yet another method for determining "base_url"

This one is great because we don't have to deal with the special cases:
* in Windows, dirname('/foo/index.php') gives "/foo", but dirname('/index.php') gives "\" instead of "/"
* dirname() doesn't include the trailing slash, with the expection of "/" (root)

props @narfbg
1 file changed