日期:2014-05-17 浏览次数:20602 次
$a = "<script>window.location.href='http://xxx.com';</script>";
<script>window.location.href='http://xxx.com';</script>
<script>window.location.href='http://xxx.com';</script>
$a = "<script>window.location.href='http://xxx.com';</script>";
$b = htmlspecialchars($a);
echo $b;
//result: <script>window.location.href='http://xxx.com';</script>
//source: <script>window.location.href='http://xxx.com';</script>