diff options
author | Zeev Suraski <zeev@php.net> | 2000-08-07 11:51:21 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2000-08-07 11:51:21 +0000 |
commit | 83341c39da7ed945164ce873fda0eed68fc79dc0 (patch) | |
tree | df0ac3098b73728f90b98f6dc0be4ca4d95f7ec3 /sapi | |
parent | 6de4e2e3825ab3de92e33468bc00ac58749af9c3 (diff) | |
download | php-git-83341c39da7ed945164ce873fda0eed68fc79dc0.tar.gz |
Add DOCUMENT_ROOT
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/isapi/php4isapi.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sapi/isapi/php4isapi.c b/sapi/isapi/php4isapi.c index 5e48b35811..4f39b36ca7 100644 --- a/sapi/isapi/php4isapi.c +++ b/sapi/isapi/php4isapi.c @@ -376,6 +376,22 @@ static void sapi_isapi_register_server_variables(zval *track_vars_array ELS_DC S } variable = php_strtok_r(NULL, "\r\n", &strtok_buf); } + +#ifdef PHP_WIN32 + { + HSE_URL_MAPEX_INFO humi; + DWORD plen = 1; + + if (lpECB->ServerSupportFunction(lpECB->ConnID, HSE_REQ_MAP_URL_TO_PATH_EX, "/", &plen, (LPDWORD) &humi)) { + /* Remove trailing \ */ + if(humi.lpszPath[strlen(humi.lpszPath) - 1] == '\\') { + humi.lpszPath[strlen(humi.lpszPath) - 1] = '\0'; + } + php_register_variable("DOCUMENT_ROOT", humi.lpszPath, track_vars_array ELS_CC PLS_CC); + } + } +#endif + if (variable_buf!=static_variable_buf) { efree(variable_buf); } |