GetIncludeSitePage
mixed CMainPage::GetIncludeSitePage( string site )
The method 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. Non-static method.
Function parameters
Parameter | Description |
---|---|
site | Site ID. |
Example 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