<?php $str = htmlspecialchars(<a href='test'>Test</a>); echo $str; //输出结果应该是 <a href='test'>Test</a> ?>