current_path()
request_path()
能夠參考以下的文章:
http://stackoverflow.com/questions/703426/how-to-get-the-full-url-of-a-drupal-page
php
下面的是老方法:
url
1. spa
drupal_get_path_alias(request_uri())
2. code
$current_path = drupal_get_path_alias($_GET["q"]);
3.
$current_url = 'http://' .$_SERVER['HTTP_HOST'] .$_SERVER['REQUEST_URI'];