This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Опиши тут, что это за файл! | |
* | |
*/ | |
// define('SITE_TEMPLATE_ID','main'); | |
require($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php'); | |
// CModule::IncludeModule("iblock"); | |
// CModule::IncludeModule("forum"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://www.php.su/functions/?fopen | |
$filecontent = 'some content'; | |
$file = fopen($_SERVER["DOCUMENT_ROOT"]."/path/name.txt","w+"); | |
fputs($file, $filecontent); | |
fclose($file); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Получаем и кешируем информацию о разделах(sections) */ | |
// должен быть подключен CModule::IncludeModule("iblock"); | |
!!!!!!! $_sections_iblock_id = .укажи id инфоблока | |
$obCache = new CPHPCache; | |
if($obCache->InitCache(24*60, 'list_sections', '/cache_path/' ){ | |
$vars = $obCache->GetVars(); | |
$sections = $vars["sections"]; | |
$sections_by_code = $vars["sections_by_code"]; | |
} else if($obCache->StartDataCache()) { |
NewerOlder