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
Unless you track this yourself, I don't believe this would have a definition. Or rather, you're asking PHP to track something that you're somewhat arbitrarily defining.
The long and short of it is, if I'm understanding your question correctly, I don't believe what you're asking for exists, at least not as "core" PHP; a given framework may provide a "root" URL relative to a directory structure that it understands.
Does that make sense?