GetCurUri
string CMain::GetCurUri( string add_params = "", string get_index_page=null )
Then method is used to obtain the path and name of the current page relative to the site root, with the parameters passed on URL. Non-static method.
If the file of the current page is not defined explicitly, the index page of a folder is determined using the algorithm of the GetDirIndex function.
Parameters
Parameter | Description | Available from version |
---|---|---|
add_params | String containing parameters to be added to the returned string. Optional parameter. empty by default. | |
get_index_page | This parameter specifies if the path that ends with "index.php" must be returned for the index page of the section. If true, the path with "index.php" is returned, otherwise - the path ending with "/" is returned. The default value is null.
If get_index_page equals to:
|
See Also
Examples of use
<? // 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 ?>
© «Bitrix24», 2001-2024