10 lines
340 B
PHP
10 lines
340 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
header('Content-Type: application/json; charset=utf-8');
|
|
echo json_encode([
|
|
'ok'=>true,
|
|
'method'=>$_SERVER['REQUEST_METHOD'] ?? null,
|
|
'post'=>$_POST,
|
|
'files'=>array_map(fn($f)=>['name'=>$f['name']??null,'size'=>$f['size']??null,'type'=>$f['type']??null,'error'=>$f['error']??null], $_FILES ?? [])
|
|
]);
|