https://blog.csdn.net/h330531987/article/details/70341191
PHP htmlspecialchars() 函数
PHP String 函数
实例
把预定义的字符 “<” (小于)和 “>” (大于)转换为 HTML 实体:
<?php
$str = "This is some <b>bold</b> text.";
echo htmlspecialchars($str);
?>
以上代码的 HTML 输出如下(查看源代码):
<!DOCTYPE html>
<html>
<body>
This is some <b>bold</b> text.
</body>
</html>
以上代码的浏览器输出:
This is some <b>bold</b> text.
文档更新时间: 2019-07-01 10:10 作者:月影鹏鹏