function request_uri in Drupal 4
Same name and namespace in other branches
- 5 includes/bootstrap.inc \request_uri()
- 6 includes/bootstrap.inc \request_uri()
- 7 includes/bootstrap.inc \request_uri()
Since request_uri() is only available on Apache, we generate an equivalent using other environment variables.
6 calls to request_uri()
- locale in modules/
locale.module - Provides interface translation services.
- page_get_cache in includes/
bootstrap.inc - Retrieve the current page from the cache.
- page_set_cache in includes/
common.inc - Store the current page in the cache.
- system_elements in modules/
system.module - Implementation of hook_elements().
- system_view_general in modules/
system.module
File
- includes/
bootstrap.inc, line 661 - Functions that need to be loaded on every Drupal request.
Code
function request_uri() {
if (isset($_SERVER['REQUEST_URI'])) {
$uri = $_SERVER['REQUEST_URI'];
}
else {
if (isset($_SERVER['argv'])) {
$uri = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['argv'][0];
}
else {
$uri = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
}
}
return $uri;
}