gpt4 book ai didi

forms - 表单数据是否由浏览器自动编码?

转载 作者:行者123 更新时间:2023-12-01 11:08:19 28 4
gpt4 key购买 nike

我已阅读 some stuff关于表单数据编码,但有一件事仍不清楚。在 enctype="application/x-www-form-urlencoded"的情况下,我们需要手动对数据进行 urlencode,don't we

... Forms submitted with this content type must be encoded as follows

必须由谁编码?通过浏览器?还是应用程序开发人员?

另一件事是——在 multipart/form-data 的情况下,使用或应该使用什么编码(如果有)?

我有点误导了这么大的提前。

最佳答案

实际上,浏览器会自动对数据进行 url 编码。还有这个w3 docs首先是为那些做浏览器的人准备的。因此,Forms submitted with this content type must be encoded as follows 这句话意味着数据应该由浏览器编码。无论如何,可以通过查看表单数据处理脚本中的原始帖子来检查它(如果 php 看起来像 file_get_contents("php://input");)

关于forms - 表单数据是否由浏览器自动编码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13920126/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com