当我在这段代码中使用 “用htmlspecialchars”:htmlspecialchars();不工作
<?php
$test = htmlspecialchars("<a>w3s.com</a>");
echo $test;
?>
我想看到的HTML实体,如:
"><script>alert - for example.
但我看到这一点:
<a>w3s.com</a>
而在浏览器中,HTML标记不显示HTML实体。 请帮忙。谢谢 (很抱歉,如果我的话建筑物的sentense建设是怪异。)
'htmlspecialchars(htmlspecialchars(“ w3s.com”))'? – 2015-01-31 22:53:38
谢谢。这种方法比其他方法简单) – hidd 2015-02-01 20:28:59