在Drupal7 当中可以使用最新的API获取URL

current_path()
request_path()
可以参考如下的文章:

http://stackoverflow.com/questions/703426/how-to-get-the-full-url-of-a-drupal-page


下面的是老方法:

1.

drupal_get_path_alias(request_uri())

2.

$current_path = drupal_get_path_alias($_GET["q"]); 
3. $current_url = 'http://' .$_SERVER['HTTP_HOST'] .$_SERVER['REQUEST_URI'];

你可能感兴趣的:(在Drupal7 当中可以使用最新的API获取URL)