Инициализация проекта
Загрузка проекта на GIT
This commit is contained in:
16
backend/index.php
Normal file
16
backend/index.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/app/config.php';
|
||||
|
||||
// Игнорируем запросы к favicon.ico и другим статическим файлам
|
||||
$requestUri = $_SERVER['REQUEST_URI'] ?? '';
|
||||
if (preg_match('/\.(ico|png|jpg|jpeg|gif|css|js|svg|woff|woff2|ttf|eot)$/i', $requestUri)) {
|
||||
http_response_code(404);
|
||||
exit;
|
||||
}
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
$accounts = Database::select('accounts', '*');
|
||||
|
||||
echo json_encode([$accounts]);
|
||||
Reference in New Issue
Block a user