CCSWebsite/auth/config.php
2025-06-17 11:10:10 +00:00

18 lines
392 B
PHP
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// 数据库配置
$host = 'localhost';
$dbname = '';
$username = '';
$password = '';
// 创建数据库连接
$conn = new mysqli($host, $username, $password, $dbname);
// 检查连接是否成功
if ($conn->connect_error) {
die("数据库连接失败: " . $conn->connect_error);
}
// 设置字符集为 utf8mb4支持中文
$conn->set_charset("utf8mb4");
?>