HTML 注释和 PHP 标签也会被去除。这里是硬编码处理的,所以无法通过 allowable_tags 参数进行改变。
Note:
In PHP 5.3.4 and later, self-closing XHTML tags are ignored and only non-self-closing tags should be used in allowable_tags. For example, to allow both <br> and <br/>, you should use:
<?php strip_tags($input, '<br>'); ?>
返回值
返回处理后的字符串。
posted on
2020-05-27 16:36佰草伐
阅读(137)
评论(0)
编辑收藏举报