Reputation: 11188
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 :)
Upvotes: 2
Views: 231
Reputation: 105878
Yes, you can read the raw POST body like so
$postBody = file_get_contents( 'php://input' );
Upvotes: 6
Reputation: 2666
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);
Upvotes: 1