From fd732663ad10ca2c54ea97d12b232c72fb519742 Mon Sep 17 00:00:00 2001 From: Flying-Alpaca <112460984+Flying-Alpaca@users.noreply.github.com> Date: Tue, 30 Aug 2022 13:10:22 +0800 Subject: [PATCH 1/3] Update api.php --- api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.php b/api.php index f9479db..b7ac6a1 100644 --- a/api.php +++ b/api.php @@ -4,7 +4,7 @@ //载入数据库文件 require("data.php"); $sql="select * from soul order by rand( ) limit 1"; - $row=mysql_fetch_assoc(mysql_query($sql)); + $row=mysqli_fetch_assoc(mysql_query($conn,$sql)); //输出json echo json_encode(array('code'=>1,'data'=>$row['title'])); ?> From 4eabe02957a6bcdf327b214939d07ffdbc0eb100 Mon Sep 17 00:00:00 2001 From: Flying-Alpaca <112460984+Flying-Alpaca@users.noreply.github.com> Date: Tue, 30 Aug 2022 13:14:24 +0800 Subject: [PATCH 2/3] Update data.php --- data.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data.php b/data.php index f2c0765..1c8d655 100644 --- a/data.php +++ b/data.php @@ -1,5 +1,5 @@ From aafc9949f1f77f749c67a28d3c080dd5fa832087 Mon Sep 17 00:00:00 2001 From: Flying-Alpaca <112460984+Flying-Alpaca@users.noreply.github.com> Date: Tue, 30 Aug 2022 13:17:20 +0800 Subject: [PATCH 3/3] Update index.php --- index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index d83970e..79c6a29 100644 --- a/index.php +++ b/index.php @@ -44,11 +44,11 @@ @@ -78,4 +78,4 @@ - \ No newline at end of file +