I have my php in /srv/www/site directory, which resolves to www.domain.com/site.
How can I pull out the site/ to make a type of BASE_URL?
I would like do something like: BASE_URL to == "http://www.domain.com/site".
I know how to define, that’s not the problem. The problem is I want my script to be installed in any folder on a site, and know that its the base folder.
Update
This script would essentially be called in http://www.anyonesdomain.com/any/possible/sub/directory/index.php and, in that case, BASE_URL would be http://www.anyonesdomain.com/any/possible/sub/directory.
Hope that makes more sense.
Parse out the PHP_SELF server variable, something like: