1e51ef7def
- Konzept/, didaktik_geografie/, didaktik_simulation/, v2-modules/, v2-platform/ - 12 code-workspace-Files - STATUS-*.md - viele M/D/R-Änderungen an bereits getrackten Files - .gitignore verstärkt: **/.humaninput/, **/secret_keys.txt Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
21 lines
553 B
PHP
21 lines
553 B
PHP
<?php
|
|
/**
|
|
* Mock-Log — schreibt eingehende Events nach mock/uploads/log.jsonl
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
function mock_log(string $endpoint, array $body): void {
|
|
$logDir = __DIR__ . '/../uploads';
|
|
if (!is_dir($logDir)) {
|
|
@mkdir($logDir, 0775, true);
|
|
}
|
|
$line = json_encode([
|
|
'ts' => date('c'),
|
|
'endpoint' => $endpoint,
|
|
'method' => $_SERVER['REQUEST_METHOD'] ?? 'GET',
|
|
'body' => $body,
|
|
], JSON_UNESCAPED_UNICODE);
|
|
@file_put_contents("$logDir/log.jsonl", $line . "\n", FILE_APPEND);
|
|
}
|