After setting it through the function mysqli_set_charset($conn,'utf8'),
Add the header setting: header('Content-type:text/html;charset=uft-8'); The output result will be garbled, but it will be normal without adding it.
沐言2020-03-07 07:23:17
Forgot the function, if you want to query MySQL or transcode MySQL data, you should write it like this mysqli_set_charset("set names utf8")