Rob*_*low 2 php http-post request intercept
我想知道是否有人可以帮我解决如何查看$_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.)
Run Code Online (Sandbox Code Playgroud)
我也试过很多其他人,我可以想到一个可以解决的问题......
您使用了正确的解决方案
foreach($_POST as $key=>$value){
//> do your operation here
echo $key.': '.$value;
}
Run Code Online (Sandbox Code Playgroud)
您可以使用$key获取参数名称