This commit is contained in:
mercury
2022-10-04 18:36:08 +04:00
commit b0f8bd56c4
35 changed files with 8217 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
error_reporting(E_ALL & ~E_NOTICE);
// ini_set('display_errors', 'On');
ini_set("log_errors", 1);
ini_set("error_log", __DIR__ . "/error_log");
$debug = [
'raw' => file_get_contents('php://input'),
'json' => json_decode(file_get_contents('php://input'), true),
'post' => $_POST,
'file' => $_FILES,
];
register_shutdown_function('exit_log', $debug);
function exit_log($debug)
{
$output = ob_get_contents();
$debug['response'] = json_decode($output, true) ?: $output;
file_put_contents(__DIR__ . '/debug', "\n" . date('Y-m-d H:i:s') . "\n" . var_export($debug, true) . "\n", FILE_APPEND);
}