search

Home  >  Q&A  >  body text

What’s wrong with the implementation of PHP search function?

111.JPG

222.JPG

333.JPG

555.JPG

#This is a database table

444.JPG

promisingpromising1297 days ago1450

reply all(4)I'll reply

  • 千战

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

    Or you can write this in the fourth line of your Conn.php:

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

    reply
    0
  • 千战

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

    Initialize a PDO object and set utf-8 encoding.

    <?php

    $dbh = new PDO('mysql:host=localhost;dbname=database name;charset=utf8', "root", "YOUXIA");

    ?>

    reply
    1
  • 猪老湿

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

    Check the encoding, and don’t have Chinese characters in the path

    reply
    0
  • promising

    I can't see it, please give me some pointers.

    promising · 2021-06-10 22:04:47
  • Cancelreply