$APPLICATION->IncludeFile(
$APPLICATION->GetTemplatePath("include/sometext.php"),
[],
["MODE" => "html"]
);
AddEventHandler('main', 'OnEpilog', '_Check404Error', 1);
function _Check404Error(){
if (((defined('ERROR_404') && ERROR_404 == 'Y') || preg_match('~404~ius', CHTTP::GetLastStatus())) && !defined('ADMIN_SECTION')) {
global $APPLICATION;
$APPLICATION->RestartBuffer();
$APPLICATION->AddChainItem("Ошибка 404");
include $_SERVER['DOCUMENT_ROOT'] . SITE_TEMPLATE_PATH . '/header.php';
include $_SERVER['DOCUMENT_ROOT'] . '/404.php';
include $_SERVER['DOCUMENT_ROOT'] . SITE_TEMPLATE_PATH . '/footer.php';
}
}
$APPLICATION->IncludeComponent(
"bitrix:main.include",
"",
array(
"AREA_FILE_SHOW" => "file",
"PATH" => SITE_DIR."include/info.php"
),
false
);