博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
在Drupal7 当中可以使用最新的API获取URL
阅读量:6856 次
发布时间:2019-06-26

本文共 268 字,大约阅读时间需要 1 分钟。

hot3.png

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

下面的是老方法:

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'];

转载于:https://my.oschina.net/mashixin/blog/282285

你可能感兴趣的文章