<?php
class DbMysql
{
public $conn;
function __construct()
{
// 创建数据库连接
$this->conn = new mysqli("localhost", "用户名", "密码", "数据库名");
$this->conn->query("set names gb2312");
}
}
?>
PHP--创建Mysql数据库连接类
最新推荐文章于 2021-02-08 23:43:27 发布