http header头:
header('Content-Type:application/json; charset=utf-8');
数据库查询时,将代码放在连接语句后面:
$conn = mysqli_connect(DB_HOST, DB_USERNAME, DB_PASSWORD, 'test'); mysqli_set_charset( $conn ,'utf8' );
问题解决。
http header头:
header('Content-Type:application/json; charset=utf-8');
数据库查询时,将代码放在连接语句后面:
$conn = mysqli_connect(DB_HOST, DB_USERNAME, DB_PASSWORD, 'test'); mysqli_set_charset( $conn ,'utf8' );
问题解决。