首頁  >  問答  >  主體

PHP搜尋功能的實作 哪裡錯了

111.JPG

222.JPG

333.JPG

555.JPG

444.JPG這個是資料庫表格

#########
promisingpromising1226 天前1399

全部回覆(4)我來回復

  • 千战

    千战2021-07-02 11:13:32

    或是你在你的Conn.php裡的第四行這麼寫:

    $db->query("SET NAMES 'utf8'");

    回覆
    0
  • 千战

    千战2021-07-02 11:06:33

    初始化一個PDO對象,設定utf-8編碼。

    <?php

    $dbh = new PDO('mysql:host=localhost;dbname=資料庫名稱;charset=utf8', "root", "YOUXIA");

    ?>

    回覆
    1
  • 猪老湿

    猪老湿2021-06-10 21:57:59

    檢查編碼, 還有路徑不要有中文

    回覆
    0
  • promising

    我看不出來啊,你指點指點

    promising · 2021-06-10 22:04:47
  • 取消回覆