Bitrix Site Manager

CMain::GetCurUri

string
CMain::GetCurUri(
 string add_params = ""
)

The method GetCurUri is used to obtain the path and name of the current page relative to the site root, with the parameters passed on URL.

Note
If the file of the current page is not defined explicitly, the index page of a folder is determined using the algorithm of the function GetDirIndex.

Parameters

ParameterDescription
add_params String containing parameters to be added to the returned string.
Optional. The default value is an empty string.

See Also

Example



<?
// current page: /en/?id=3&s=5
$uri = $APPLICATION->GetCurUri("r=1&t=2"); // result: /en/index.php?id=3&s=5&r=1&t=2
?>