如何在PHP中将HTTP请求中的所有信息打印到屏幕上 [英] How to print all information from an HTTP request to the screen, in PHP

查看:627
本文介绍了如何在PHP中将HTTP请求中的所有信息打印到屏幕上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些PHP代码来转储HTTP请求中的所有信息,包括标头和POST请求中包含的任何信息的内容。基本上,一个诊断工具,它准确地吐出我发送给服务器的内容。

I need some PHP code that does a dump of all the information in an HTTP request, including headers and the contents of any information included in a POST request. Basically, a diagnostic tool that spits out exactly what I send to a server.

有没有人有一些代码可以做到这一点?

Does anyone have some code that does this?

推荐答案

最后:

print_r($_REQUEST);

这涵盖了大多数收到的物品: PHP.net Manual:$ _REQUEST

That covers most incoming items: PHP.net Manual: $_REQUEST

这篇关于如何在PHP中将HTTP请求中的所有信息打印到屏幕上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆