Blogger Information
Blog 65
fans 1
comment 1
visits 118978
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
tp5 防止xss sql 注入攻击
技术宅的博客
Original
1376 people have browsed it

// 默认全局过滤方法 用逗号分隔多个

'default_filter' => 'htmlspecialchars,addslashes,strip_tags',
htmlspecialchars:防XSS攻击,尖括号等转义过滤

addslashes:防SQL注入,在每个双引号(")前添加反斜杠

strip_tags:剥去字符串中的 HTML 标签


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post