开发者

Equivallent for $_SERVER['argv'] when using $_POST?

I'm wondering if there is a $_POST equivallent for $_SERVER['argv'], which only works with $_GET.

This is because my ajaxscript recently changed from $_GET to $_POST due to IE7 issues but the query passed into the ajaxfunction is quite long.

So if there is a simple alternative rather than to reconstruct the $_开发者_开发知识库GET string from a $_POST array that would be nice :)


Yes, you can read the raw POST body like so

$postBody = file_get_contents( 'php://input' );


There's no way I can find to get the actual POST string, but it's pretty easy to construct it.

$poststring = http_build_query($_POST);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜