Bitrix Site Manager

CMainPage::GetIncludeSitePage

mixed
CMainPage::GetIncludeSitePage(
 string site_id
)

The method GetIncludeSitePage returns the absolute path to the index page of the specified site, for further inclusion using require() or include(). If no site can be identified by host, the function returns false.

Parameters

ParameterDescription
site_id Site ID.

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