GetSiteByHost
mixed CMainPage::GetSiteByHost()
The method returns site ID, defining it by the current host. If the obtained site ID is invalid the method returns false. Non-static method.
Function parameters
No parameters.Examples of index page
<? require($_SERVER['DOCUMENT_ROOT']."/bitrix/modules/main/include/mainpage.php"); if($page = CMainPage::GetIncludeSitePage(CMainPage::GetSiteByHost())) require_once($page); require($_SERVER['DOCUMENT_ROOT']."/bitrix/header.php");?> <?require($_SERVER['DOCUMENT_ROOT']."/bitrix/footer.php");?>
© «Bitrix24», 2001-2024