sprzadaz analiza AI

This commit is contained in:
zzdrojewskipaw
2025-08-22 15:56:47 +02:00
parent ed05cdeb75
commit d1ff1fa0ac
6 changed files with 484 additions and 63 deletions

View File

@@ -0,0 +1,12 @@
<?php
// modules/EcmInvoiceOuts/ai/result.php
$base = __DIR__;
$files = glob("$base/out/*.json");
rsort($files);
$latest = $files[0] ?? null;
if (!$latest) { http_response_code(404); exit('Brak wyników'); }
$payload = json_decode(file_get_contents($latest), true);
header('Content-Type: application/json; charset=utf-8');
echo json_encode($payload, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);