Home > Backend Development > PHP Tutorial > $_POST跟$_GET是多余的吗

$_POST跟$_GET是多余的吗

WBOY
Release: 2016-06-13 11:24:34
Original
722 people have browsed it

$_POST和$_GET是多余的吗
PHP好像能够自动获取post或get请求的数据,根本不需要用$_POST或$_GET数组来获取。例如:

$userName=$_POST["userName"];
$PS=$_POST["PS"];
echo "您输入的用户名是:".$userName;
echo "
您输入的密码是:".$PS;
?>
即使把代码中$_POST那两行去掉仍然能获取到表单数据,那么我想$_POST和$_GET是多余的吗,还有我觉得这是PHP和ASP的最大区别,ASP不用request集合是绝对获取不到的

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