Код |
---|
AddEventHandler('main', 'OnEpilog', '_Check404Error', 1); function _Check404Error() { if (defined('ERROR_404') && ERROR_404=='Y') { GLOBAL $APPLICATION; $APPLICATION->RestartBuffer(); include $_SERVER['DOCUMENT_ROOT'].'/bitrix/templates/'.SITE_TEMPLATE_ID.'/header.php'; require ($_SERVER['DOCUMENT_ROOT'].'/404.php'); include $_SERVER['DOCUMENT_ROOT'].'/bitrix/templates/'.SITE_TEMPLATE_ID.'/footer.php'; } } |