您的位置:首页 > Web前端 > Node.js

[Drupal] How to get the real path of a node, no matter it is a path or a url alias

2010-08-23 14:16 841 查看
Just test the code as below:

代码

$uri = substr(request_uri(), 1, strlen(request_uri()));
$uri_array = array();
if(!($path = drupal_lookup_path('source', $uri))) {
$uri_array = explode('/', $uri);
}
else {
$uri_array = explode('/', $path);
}

var_dump($uri_array);


Have fun!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐