Bitrix Site Manager

CMainPage::GetSiteByHost

mixed
CMainPage::GetSiteByHost()

The method GetSiteByHost returns site ID, defining it by the current host. If the obtained site ID in invalid the method will return false.

Parameters


No parameters.

See Also

Example



<?
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");?>