sprzadaz analiza AI
This commit is contained in:
12
modules/EcmInvoiceOuts/ai/result.php
Normal file
12
modules/EcmInvoiceOuts/ai/result.php
Normal 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);
|
||||
Reference in New Issue
Block a user