Home  >  Article  >  Backend Development  >  What is the difference between $_REQUEST and $_POST|$_GET in PHP? ?

What is the difference between $_REQUEST and $_POST|$_GET in PHP? ?

WBOY
WBOYOriginal
2016-10-23 00:12:531031browse

What is the difference between $_REQUEST and $_POST|$_GET in PHP? ? Please ask the gods for answers

Reply content:

What is the difference between $_REQUEST and $_POST|$_GET in PHP? ? Please ask the gods for answers

$_REQUEST[] has the functions of $_POST[ ] $_GET[ ], but $_REQUEST[ ] is slower. All data submitted via POST and GET methods are available through the $_REQUEST array

$_REQUEST can get the content in $_POST, $_GET, $_COOKIE.
When $_POST, $_GET, $_COOKIE exist at the same time. $_REQUEST can only get one of the values. The priority is: get $_POST first, then $_GET, and finally $_COOKIE.

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