|
|
Ok!
|
|
|
Ok!
|
|---|---|---|---|---|
| 321 | function log_error($message) {
file_put_contents('php_errors.log', date('Y-m-d H:i:s')." - ".$message.PHP_EOL);
} | php, log to file | 200 | Лог в файл php |
| 313 | // определим константу LOG_FILENAME, в которой зададим путь к лог-файлу
define("LOG_FILENAME", $_SERVER["DOCUMENT_ROOT"]."/mylog-6665444.txt");
//дебаг почты
function custom_mail($to, $subject, $message, $additional_headers='', $additional_parameters='')
{
AddMessage2Log(
'To: '.$to.PHP_EOL.
'Subject: '.$subject.PHP_EOL.
'Message: '.$message.PHP_EOL.
'Headers: '.$additional_headers.PHP_EOL.
'Params: '.$additional_parameters.PHP_EOL
);
if ($additional_parameters!='') {
return @mail($to, $subject, $message, $additional_headers, $additional_parameters);
} else {
return @mail($to, $subject, $message, $additional_headers);
}
} | mail, php, log, bitrix | 19005 | mail log bitrix |
| 308 | system('tail -n 100 /home/bitrix/.msmtprc') | почта, bitrixvm, log mail | 300 | Посмотреть в php строке Битрикс лог почты |
| 261 | function flog($fname, $ftext, $write_a_w_state = null){
if($write_a_w_state)
$write_a_w_state = 8; // FILE_APPEND
else
$write_a_w_state = 0; // FILE_APP
$fp = "/home/virtwww/w_2315art-ru_25432bcf/http/log/" . substr($fname, 0, strpos($fname, ".")) . "_" . date('m') . "_" . date('Y') . substr($fname, strpos($fname, "."));
file_put_contents($fp, date("Y-m-d H:i:s ") . $ftext . "
", $write_a_w_state);
} | log, php, func | 110 | flog new |
| 253 | $iterator = CIBlockElement::GetList(
array("ID"=>"DESC"),
array('IBLOCK_ID' => 26, '=ACTIVE' => 'Y', 'IBLOCK_SECTION_ID', ['LOGIC' => 'OR', 'PREVIEW_TEXT' => false, 'DETAIL_TEXT' => false]),
false,
false,
array('ID', 'NAME', 'CODE', 'IBLOCK_SECTION_ID')
);
while($item = $iterator->Fetch()) {
$was_id = 0;
$nav = CIBlockSection::GetNavChain(false, $item['IBLOCK_SECTION_ID'], array(), false);
$url = "";
while($nav->Fetch()){
if($was_id != $item['ID']){
$url_length = count($nav->arResult);
$url .= $nav->arResult[$url_length - 1]['CODE'] . "/";
echo $item['ID'] . ';"' . $item['NAME'] . '";"https://lamaree.ru/catalog/' . $url . $item['CODE'] . '/"' . "
";
$was_id = $item['ID'];
}
}
} | url, bitrix, catalog | 980 | Выбрать из каталога Битрикс товары без описаний с URL |
| 238 | "SECTION_URL" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["section"], | bitrix, catalog.section.list | 500 | Путь секции для catalog.section.list |
| 205 | function flog($fname, $ftext, $write_a_w_state = null){
if(!$write_a_w_state)
$write_a_w_state = "a+";
$fp = fopen("/home/d/dlmlru/posuda/public_html/log/" . $fname, $write_a_w_state);
fwrite($fp, date("Y-m-d H:i:s ") . $ftext . "
");
fclose($fp);
} | flog | 12090 | функция логирования php |
| 142 | array("LOGIC"=>"OR","NAME"=>$q,"PREVIEW_TEXT"=>$q, "PROPERTY_CML2_ARTIKUL"=>$q), | фильтр с логикой, логика, битрикс, bitrix, logic | 500 | Фильтр с логикой в Битрикс |
| 10 | require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); | битрикс пролог, prolog_before | 1040 | Подключение пролога вместо вывода шапки Битрикс |