php://input:
Array
(
)
You are not using CGI PHP
<?php
error_reporting(E_ALL);
$raw_post = file_get_contents('php://input');
echo 'php://input: ' . $raw_post;
echo '<br/>';
print_r($_POST);
echo '<br/>';
$sapi_type = php_sapi_name();
if (str_starts_with($sapi_type, 'cgi')){
echo "You are using CGI PHP\n";
} else {
echo "You are not using CGI PHP\n";
}
?>
<form action="test.php" method="POST">
<label>Username: <input type="text" name="username"/></label>
<input type="submit" value="click">
</form>
<hr>
<?php show_source(__FILE__); ?>