1. Relationship: $_request contains all the contents of $_get, $_post, $_cookie, and is their aggregate.
2.$_get, $_post, $_cookie have a copy in $_request. Changing the value of $_request does not affect $_get, and vice versa.
3.GET and Post have the same name, $_request takes the value of the post. In the case of a cookie with the same name as Get or post, $_request takes the value of the cookie. Cookies have the highest precedence. Error.
6.7.2010 Update:
Php. INI is very clear, Variables_order = "GPCs",
This order of precedence can be changed.
Oh, my gosh, I'm too low on the level.
The test begins.
Test 1:
<code>
Echo ' <pre> '//source format printing
URL plus m=xxoo&url=www.111cn.net to test $_get
Print_r ($_request)//First print content
Print_r ($_get);
$_request = Array ();//Empty $_request
echo $_get[' m '];
Echo ' </pre> ';
</code>
Test Result: The value of $_get[' m ' is xxoo.
Test 2:
<code>
Echo ' <pre> '//source format printing
URL plus m=xxoo to test $_get
Print_r ($_request);
Print_r ($_get);
$_get = Array ();//Empty
Print_r ($_request);
Echo ' </pre> ';
</code>
Test Result: The value of $_request[' m ' is xxoo.
Conclusion: The operation of $_request does not affect $_get, and vice versa. $_request just contains a copy of the $_get (the same as $_post haha).
------------------------------------Gorgeous divider line www.111cn.net:)---------------------------------------------------
Good. Go on
Test 3
<code>
Post-get Duplicate name Test
Send a value of M from another page post to post,action address plus m=get
Print_r ($_request);
Print_r ($_get);
Print_r ($_post);
</code>
Result: $_request[' m '] = = ' post '.
Conclusion: Both the Get and post are submitted with the same name, and $_request takes the value of the post. (The post priority may be higher.) )
Test 4
<code>
Cookie and Postget Duplicate test
Setcookie (' m ', ' Cookie ', Time () +3600);//First the cookie is planted, the name is M, and the value is cookie. and then refresh. (Cookies will not take effect until they are refreshed)
Send a value of M from another page post to post,action address plus m=get
Print_r ($_request);
</code>
Result: $_request[' m '] = = ' Cookie '. Conclusion: Cookies have the highest priority.