PHP

How to print the request method used to access the webpage in PHP | PHP program

How to print the request method used to access the webpage in PHP | PHP program

How to print the request method used to access the webpage in PHP | PHP program

We will use $_SERVER['REQUEST_METHOD'] superglobal to get the request method used to access the webpage.

<?php



$RequestMethod = $_SERVER['REQUEST_METHOD'];

printf("Request Method: %s<br>", $RequestMethod);
?>
TutorialsLink Curator

This is an official account managed by the team TutorialsLink Community