Home > Backend Development > PHP Problem > How to get Http request in php

How to get Http request in php

Guanhui
Release: 2023-02-28 21:10:02
Original
5431 people have browsed it

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;
Copy after login

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!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template