2025-06-17 01:43:15 +00:00
|
|
|
|
<?php
|
|
|
|
|
// 数据库配置
|
|
|
|
|
$host = 'localhost'; // 数据库主机(本地通常为 localhost)
|
2025-06-17 11:11:07 +00:00
|
|
|
|
$dbname = ''; // 数据库名(你提供的名称)
|
|
|
|
|
$username = ''; // 数据库用户名(默认通常为 root)
|
|
|
|
|
$password = ''; // 数据库密码(你提供的密码)
|
2025-06-17 01:43:15 +00:00
|
|
|
|
|
|
|
|
|
// 创建数据库连接
|
|
|
|
|
$conn = new mysqli($host, $username, $password, $dbname);
|
2025-06-17 11:12:36 +00:00
|
|
|
|
$easyauthConn = new mysqli($host, $username, $password, $dbname);
|
2025-06-17 01:43:15 +00:00
|
|
|
|
|
|
|
|
|
// 检查连接是否成功
|
|
|
|
|
if ($conn->connect_error) {
|
|
|
|
|
die("数据库连接失败: " . $conn->connect_error);
|
|
|
|
|
}
|
2025-06-17 11:11:07 +00:00
|
|
|
|
$host = 'localhost';
|
|
|
|
|
$dbname = 'easyauth';
|
|
|
|
|
$username = 'ccs';
|
|
|
|
|
$password = 'ccsdatabase';
|
|
|
|
|
$easyauthConn = new mysqli($host, $username, $password, $dbname);
|
2025-06-17 01:43:15 +00:00
|
|
|
|
|
|
|
|
|
$conn->set_charset("utf8mb4");
|
2025-06-17 11:12:36 +00:00
|
|
|
|
?>
|
2025-06-17 01:43:15 +00:00
|
|
|
|
?>
|