The post data of PHP and the request data
The post data of PHP is similar to the request data $_post variable (array) $_get variable (array), $_post represents the array of data submitted by the page via post. Post submission data, usually only one form: Its role is: Users fill out the form data, and submitted, will send the data (submitted) to the page abc.php, in fact, can also be understood as "open" the page (abc.php), but also can be understood as "request" the page (abc.php) The form of receiving post data is: (in abc.php Web page) Usually, the form form of the Web page, generally used post, get method is generally embodied in the other 3 forms $_request variable (array) $_request array, in fact, is not a separate data source, Instead, the "sum" of $post data and $_get data, which includes all $_post data and $_get data in the $_request array, is automatically stored internally by the system. Typically, $_post data and $_get data do not "occur simultaneously," and the $_request array represents one of them. The case where get and post data are submitted simultaneously: at this time, there is generally only one form of HTML syntax that occurs, as follows: At this point, uname and upswd two data are submitted to abc.php in post and simultaneously: A=5 and b=10 two data, The get data is obtained on the page by getting it to abc.php: $v 1 = $_get[' a ']; $v 2 = $_get[' b]; This gets the POST data: $v 3 = $_post[' UName '); $v 4 = $_post[' upswd '); However, all data can also be obtained: $v 1 = $_request[' a ']; $v 2 = $_request[' b]; $v 3 = $_request[' UName '); $v 4 = $_request[' upswd ') description when get data and post data are submitted simultaneously with duplicate name: WKIOL1ZB0GUXMILKAABMI-TH574335.JPG1: Try to avoid duplicate names 2: If the name is the same, then $_ Request will only record (store) One of the data (either get data or post data) 3: As to which is recorded, is determined by a setting in php.ini Request_order = "GP"; This is the default value, G represents get,p for post its meaning is: first store get data, then store post data Thus, if the same name, then the post data will overwrite the get data to: Request_order = "PG", order in turn .... Note: $_request, $_get, $_post three kinds of data independent of each other! $_server variable (array) This variable stores some request or setup information for the server side or client, and the data items may be different for different servers and different request pages. Commonly used are: IP address of the REMOTE_ADDR user Server_addR server-side IP address server_name server name (hostname) Document_root site Absolute Path (in fact, DocumentRoot in host settings php_self the file path of the current Web page queer_string Represents the overall font string for a GET request, similar to the following: "A=5&b=10" in the http://www.abc.com/abc.php?a=5&b=10 link address outputs all items (may vary per server): 9000000000000000
http://www.bkjia.com/PHPjc/1069908.html www.bkjia.com true http://www.bkjia.com/PHPjc/1069908.html techarticle The post data of PHP and the request data PHP post data is similar to the request data $_post variable (array) $_get variable (array), $_post represents the data that the page submits through the Post form ...