htmlentities() 单双引号不转换
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?php $str = "John & 'Adams'";echo htmlentities($str, ENT_COMPAT);echo "<br />";echo htmlentities($str, ENT_QUOTES);echo "<br>";echo htmlentities($str, ENT_NOQUOTES);?>
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->John & 'Adams'<br>John & 'Adams'<br>John & 'Adams'