Home  >  Article  >  Backend Development  >  How to get Http request in php

How to get Http request in php

Guanhui
GuanhuiOriginal
2020-04-29 18:11:265393browse

How to get Http request in php

php method to obtain Http request

$_SERVER introduction

$_SERVER is a containing An array of information such as header, path, and script locations.

Method example of obtaining Http request

$req_method = $_SERVER['REQUEST_METHOD'];
echo $req_method;

Output result:

How to get Http request in php

The above is the detailed content of How to get Http request in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn