对于Get 失去的String数据要进行怎样的预处理才安全

WBOY
Release: 2016-06-13 10:33:50
Original
1086 people have browsed it

对于Get 得到的String数据要进行怎样的预处理才安全
get到一串字符,然后想放到SQL Where `项目`=$_GET["xxxxx"] 语句里面,然后在MySQL查找信息
怎样处理才安全

我想要get到的这个string只剩下数字和英文字母.

------解决方案--------------------
那你把不是字母和数字的字符处理掉
------解决方案--------------------
http://www.w3school.com.cn/php/func_mysql_real_escape_string.asp

http://www.w3school.com.cn/php/func_string_addslashes.asp

自定义过虑函数
------解决方案--------------------

探讨

引用:

那你把不是字母和数字的字符处理掉


是啊是啊就是这样
Related labels:
source:php.cn
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