Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在数据库中有一个欧元符号。当我想在我的网站上打印它时,它会显示一个问号。
它来自文本字段-> 数据库-> 网站。
您的数据库不是 UTF-8。
这可能会有所帮助:
mysqli_query($conn, "SET NAMES utf8");
或者这个查询:
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8
此外,在您的 HTML 页面中包含此<meta />标记:<head>
<meta />
<head>
<meta charset="UTF-8" />