上传文件至 /

This commit is contained in:
2025-09-24 14:15:03 +00:00
parent acf704a5e1
commit 45af503e01
5 changed files with 596 additions and 0 deletions

21
db_config.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
// 数据库配置
$host = 'localhost';
$db = 'a1sax1m9i';
$user = 'a1sax1m9i';
$pass = 'a1sax1m9i';
$charset = 'utf8mb4';
$dsn = "mysql:host=$host;dbname=$db;charset=$charset";
$options = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false,
];
try {
$conn = new PDO($dsn, $user, $pass, $options);
} catch (\PDOException $e) {
throw new \PDOException($e->getMessage(), (int)$e->getCode());
}
?>