summaryrefslogtreecommitdiff
path: root/connect.php
diff options
context:
space:
mode:
Diffstat (limited to 'connect.php')
-rw-r--r--connect.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/connect.php b/connect.php
index 8787da3..0a94c31 100644
--- a/connect.php
+++ b/connect.php
@@ -1,4 +1,5 @@
<?php require_once 'config.php'?>
+<?php require_once 'db.php'?>
<?php
@@ -8,7 +9,7 @@ function execute_sql($sql) {
global $conn;
if($conn == NULL){
// 创建连接
- $conn = new mysqli(Config::$servername, Config::$username, Config::$password, Config::$db_name);
+ $conn = new mysqli(DBConfig::$servername, DBConfig::$username, DBConfig::$password, DBConfig::$db_name);
// 检测连接
if ($conn->connect_error) {