• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/main.php
  • Класс: CAllMain
  • Вызов: CAllMain::GetCurPage
public function GetCurPage($get_index_page=null)
{
	if (null === $get_index_page)
	{
		if (defined('BX_DISABLE_INDEX_PAGE'))
			$get_index_page = !BX_DISABLE_INDEX_PAGE;
		else
			$get_index_page = true;
	}

	$str = $this->sDocPath2;

	if (!$get_index_page)
	{
		if (($i = mb_strpos($str, '/index.php')) !== false)
			$str = mb_substr($str, 0, $i).'/';
	}

	return $str;
}