I\'d like to find the base url of my application, so I can automatically reference other files in my application tree...
So given a file config.php in the base of my
If you want the path on the filesystem you can use $_SERVER['DOCUMENT_ROOT'] If you just want the path of the file that appears in the URL after the domain use $_SERVER['REQUEST_URI']
$_SERVER['DOCUMENT_ROOT']
$_SERVER['REQUEST_URI']