Reputation: 71
I just have a very strange behaviour of HTTP POST method in php. An example below:
I create a file named post.php
// post.php
<?php
print_r($_POST);
exit;
?>
And sending some data to this page via curl:
curl 'http://example.com/post.php' --data 'test=test2'
it returns:
Array
(
[test] => test2test=test2
)
In case i send data with 2 or more keys:
curl 'http://example.com/post.php' --data 'test=test2' --data 't=1'
it returns:
Array
(
[test] => test2
[t] => 1
)
This problem arose after php upgrading.
Environment: PHP - PHP 5.4.4-14+deb7u5 OS - Debian 6.0.3 64bit
Does anybody faced with problem like that?
Upvotes: 5
Views: 260