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.
您是否设置了正确的编码?
是否有可能将 utf8 字符转换为 ಠ 的符号?如果您在该字符串上再次调用 htmlspecialchars,则 & 变为 &,因此不再是 utf8 代码,可以通过将双编码参数设置为 false 来防止这种情况。请参阅 php.net 上的文档:
http://php.net/htmlspecialchars