first commit

This commit is contained in:
2025-01-10 15:20:33 +08:00
commit 4f5d2aa650
66 changed files with 15921 additions and 0 deletions

18
Web/imasBackend/test.php Normal file
View File

@ -0,0 +1,18 @@
<?php
header('Content-Type: text/html; charset=utf-8');
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST');
header('Access-Control-Allow-Headers: Content-Type');
header('Access-Control-Allow-Headers: Authorization');
header('Access-Control-Allow-Headers: X-Requested-With');
header("Content-Type: application/json"); // 返回 JSON 格式的响应
include_once "db_config.php";
$queryString = "select * FROM status";
$result = mysqli_query($conn, $queryString);
if(mysqli_num_rows($result) > 0){
$data = []; // 初始化为空数组
while ($row = mysqli_fetch_object($result)) { // 获取查询结果作为对象
$data[] = $row; // 将对象追加到数组中
}
echo substr(json_encode($data),1,58) ; // 输出 JSON 格式的响应
}