我想获取当前页面的URL并将其存储到我的自定义皮肤模板中的变量中。我这样做是为了可以在其他地方使用这个URL。我尝试像这样做:
function currentpageurl() //Some Custom function
{
$url= [something that can get current page's url in mediawiki and store it to this variable]
.....use the $url variable for other purposes....
......
.....
}
Mediawiki有一种方式可以识别当前页面的URL吗?还是说我唯一的选择是使用这种方法来找到当前页面?
$url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];