From f44dbbafe119bc104828d91bdd0abc7b1fe23bb2 Mon Sep 17 00:00:00 2001 From: "cn.yimian.xyz" Date: Mon, 7 Sep 2020 12:05:40 +0800 Subject: [PATCH] bug --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index b88a1ad..c1feea6 100644 --- a/index.php +++ b/index.php @@ -18,7 +18,7 @@ $conn = db__connect("yulu"); $words = db__getData($conn, "yulu", "lang", $lang); -$rand = rand(0, count($words)); +$rand = rand(0, count($words) - 1); echo $words[$rand]['words'];