gpt4 book ai didi

PHP - 拦截 POST 请求

转载 作者:行者123 更新时间:2023-12-01 22:52:13 26 4
gpt4 key购买 nike

我想知道是否有人可以帮我解决如何查看$_POST请求。

我想做的是检查所有 $_POST 请求,而不仅仅是某些请求,如 $_POST['name'], $_POST['post']等等,我想检查每个帖子,但无法知道每个 POST 请求的名称。

这是我试过的(片段):

foreach ($_POST as $pst)
{
echo $pst;
}
//And tried the above for GET too. (but the GET I've manged to working.)

我也试过很多其他的,我能想到的都无法解决...

最佳答案

您使用了正确的解决方案

foreach($_POST as $key=>$value){
//> do your operation here
echo $key.': '.$value;
}

您可以使用$key 获取参数名称

关于PHP - 拦截 POST 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6191329/

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