Login Done
This commit is contained in:
+11
-1
@@ -7,4 +7,14 @@ $dotenv = Dotenv\Dotenv::createImmutable($_SERVER['DOCUMENT_ROOT']); // dir cont
|
||||
$dotenv->load();
|
||||
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/auto/connection.php';
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/auto/user.php';
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/auto/user.php';
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
$contentType = $_SERVER['CONTENT_TYPE'] ?? '';
|
||||
if (str_contains($contentType, 'application/json') || str_contains($contentType, 'text/plain')) {
|
||||
$input = json_decode(file_get_contents("php://input"), true);
|
||||
if (is_array($input)) {
|
||||
$_POST = [...$_POST, ...$input];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user