使用tp3.1版本

1、APP/common 自定义函数

function filter_default(&$value){
$value = htmlspecialchars($value);
}

 

2、config配置默认过滤器

'VAR_FILTERS'=>'filter_default,filter_exp'

 

参见

http://www.thinkphp.cn/document/308.html

 

3、显示时使用 &lt; - > '<' 则使用

{$vo.content|htmlspecialchars_decode}

参见

http://blog.csdn.net/losetowin/article/details/7292709

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-23
  • 2022-02-15
  • 2022-02-26
  • 2022-12-23
  • 2021-04-26
  • 2021-11-19
猜你喜欢
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2022-02-20
相关资源
相似解决方案