数据库显示希伯来语,但在 php 中,希伯来语数据显示为问号
Database is showing hebrew, but in php the hebrew data is showing as question marks
数据库显示希伯来语,但在 php 中,希伯来语数据显示为问号。
我的代码是这样的(这不是完整的代码):
<?php
require('connect.php');
$result = mysqli_query($con,"SELECT * FROM bookList ORDER BY title LIMIT
10");
$row = mysqli_fetch_assoc($result);
$title = $row['title'];
echo $title;
?>
检查您的字符编码是否始终为 UTF-8。
- 检查数据库是utf-8
- 检查 table 是 utf-8
- 检查列是否为 utf-8
- 检查 html 元标记字符集是否为 utf-8
- 在您的 IDE 或文本编辑器中检查 PHP 文件是否为 utf-8。
数据库显示希伯来语,但在 php 中,希伯来语数据显示为问号。 我的代码是这样的(这不是完整的代码):
<?php
require('connect.php');
$result = mysqli_query($con,"SELECT * FROM bookList ORDER BY title LIMIT
10");
$row = mysqli_fetch_assoc($result);
$title = $row['title'];
echo $title;
?>
检查您的字符编码是否始终为 UTF-8。
- 检查数据库是utf-8
- 检查 table 是 utf-8
- 检查列是否为 utf-8
- 检查 html 元标记字符集是否为 utf-8
- 在您的 IDE 或文本编辑器中检查 PHP 文件是否为 utf-8。