都说PHP安全,小弟我想问下,接收用户的数据怎么办

WBOY
Release: 2016-06-13 13:31:47
Original
928 people have browsed it

都说PHP安全,我想问下,接收用户的数据怎么处理?
都说PHP安全,我想问下,接收用户的数据怎么处理?有没有标准通用的接收函数?

现在基本上都是:
$a = $_POST["a"];

$a = $_GET["a"];

该如何接收?或怎么过滤就比较安全?因为要执行SQL的了。怎么保证安全?

最好有一个比较全面的函数来处理这些请求。
1、可过滤特殊字符,防止SQL注入。
2、可接收POST/GET/COOKIE/REQUEST等数据。

大家有可分享的不?

------解决方案--------------------
使用extract()函数?
------解决方案--------------------

探讨

使用extract()函数?
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