It is the server document root, not the invididual web site root directory.
I handle this by setting the document root by deriving it from the filename for the bootstrap file inside htdocs/ or whatever the web site root is.
i.e.
CODE
substr($_SERVER['SCRIPT_FILENAME'], 0, strrpos($_SERVER['SCRIPT_FILENAME'], '/'))
Over here, it should return /www/subdomain/.../htdocs/