File is running in apache server and when a request was made from postman it showing empty input data below is the code
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "I am here";
$tempval = file_get_contents('php://input');
//$postdata = json_decode(file_get_contents('php://input'), true);
echo "Data ".$tempval;
Output for this file
I am hereData
which means that tempval is empty i.e no data is recieved from the request