Skip to content

Instantly share code, notes, and snippets.

@MrWhiteD
Last active July 5, 2024 05:26
Show Gist options
  • Save MrWhiteD/51266e6b264397c16ae7ef39ba399d01 to your computer and use it in GitHub Desktop.
Save MrWhiteD/51266e6b264397c16ae7ef39ba399d01 to your computer and use it in GitHub Desktop.
[Лог дебаг битрикс] #bitrix #debug #log #dump
<?
// https://dev.1c-bitrix.ru/api_d7/bitrix/main/diag/debug/index.php
\Bitrix\Main\Diag\Debug::dumpToFile($variable, $varName = '__'.date('d.m.Y H:i:s'), $fileName = '');
//вардампим через file_put_contents
ob_start();
echo "page_type=".$page_type;
var_dump($_SERVER);
$out = ob_get_contents();
ob_end_clean();
file_put_contents("/home/u49884/engine.space/www/yb_log.txt", $out, FILE_APPEND);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment