0

当我运行这样的 PHP 查询时,我无法从 Mysql 服务器接收数据:

$mysqli->query("utf8_general_ci"); // I have tried "UTF8" - Didn't work
$query =  "SELECT * FROM graf WHERE onoma LIKE 'ΓΕ%' ";
$mysqli->query("SET CHARACTER SET 'utf8_general_ci'");
$result = mysqli_query($mysqli,$query);
if ($result !=0)
{
 while ($row = mysqli_fetch_assoc($result))
{
      echo $row['onoma'];
 }
 }
echo mysqli_error($mysqli); //gives no error
echo mysqli_sqlstate($mysqli); //gives 00000 which means the statement is correct

有人可以帮忙吗?先感谢您,

4

1 回答 1

0

尝试使用以下设置 php 内容类型:

header('Content-Type: text/html; charset=utf-8');
于 2013-07-31T16:34:18.173 回答