Home > Backend Development > PHP Tutorial > 用了PDO还用过滤用户输入吗?

用了PDO还用过滤用户输入吗?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-20 09:37:01
Original
1019 people have browsed it

有人说还要过滤XSS   可是不知道怎么过滤XSS怎么办?   还有像长度 数据类型这些是不是只要在前端过滤就行了?


回复讨论(解决方案)

PDO是过滤mysql注入
XSS可以使用htmlentities($str); 输出来防止

从头学什么是sql注入、xss,代码写的不好,用pdo一样可以存在sql注入

必须过滤啊!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template