Return the current URL path of the page being viewed.
Examples:
This function is not available in hook_boot() so use $_GET['q'] instead. However, be careful when doing that because in the case of Example #3 $_GET['q'] will contain "path/alias". If "node/306" is needed, calling drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL) makes this function available.
The current Drupal URL path. The path is untrusted user input and must be treated as such.
function current_path() {
return $_GET['q'];
}