GetCurPage
string CMain::GetCurPage( bool get_index_page=null )
The method is used to obtain the path and name of the current page relative to the site root. Non-static method.
IIf 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
Parameter | Description | Available from version |
---|---|---|
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 $page = $APPLICATION->GetCurPage(); // result - /en/index.php ?>
© «Bitrix24», 2001-2024