Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP表单 #12

Open
suhao opened this issue May 16, 2022 · 0 comments
Open

PHP表单 #12

suhao opened this issue May 16, 2022 · 0 comments

Comments

@suhao
Copy link
Member

suhao commented May 16, 2022

HTML表单是前后端数据交互的很重要的一部分,PHP能把来自HTML页面的表单元素自动变成可供PHP脚本使用的数据。$_GET和$_POST变量用于检索表单中的信息,如用户的输入

$_GET

$_GET用于收集来自method=get的表单中的值,从带有GET方法的表单发送的信息,任何人都是可见的,在地址栏中以键值对形式传递给后端

$_POST

$_POST用于收集来自method=post的表单数据,从POST方法发送的信息对用户来讲是不可见的,对发送的信息量也没有限制。POST方法默认发送的信息量最大为8MB,可以通过php.ini中的post_max_size更改

$_REQUEST

$_REQUEST包含了$_GET、$_POST和$_COOKIE的内容

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant