Update: 2026-06-26 00:41:47
This commit is contained in:
@@ -15,14 +15,10 @@ require_once __DIR__ . '/core/bootstrap.php';
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
// دعم JSON body بالإضافة إلى POST/GET
|
||||
// دمج GET + POST + JSON body
|
||||
$rawBody = file_get_contents('php://input');
|
||||
if ($rawBody) {
|
||||
$json = json_decode($rawBody, true);
|
||||
if ($json) {
|
||||
$_POST = array_merge($_POST, $json);
|
||||
}
|
||||
}
|
||||
$json = $rawBody ? json_decode($rawBody, true) : [];
|
||||
$_POST = array_merge($_GET, $_POST, $json ?: []);
|
||||
|
||||
try {
|
||||
/* ================== قراءة المدخلات ================== */
|
||||
|
||||
Reference in New Issue
Block a user