<?php header("content-type:text/html;charset=utf-8"); $host = 'localhost'; $username = 'root'; $password = 'root'; $dbname = 'student_info'; //$db = new mysqli($host,$username,$password,$dbname); $db = mysqli_connect($host,$username,$password,$dbname); mysqli_set_charset($db,'utf8_encode'); if($db){ //echo "MySql connection successful"; echo "MySql连接成功!"; } /* $link = mysqli_connect($host,$username,$password); mysqli_select_db($link, $dbname); if($link){ echo "MySql connection successful"; }*/ ?>
Le problème est résolu car mon outil de développement de bloc-notes est d'un autre type d'encodage