Why is the $_request empty?

Source: Internet
Author: User
My php.ini is set up in this way:

Variables_order = "Egpcs"
Request_order =

Request_order the value of Variables_order if I leave it blank?


Reply to discussion (solution)

Do not know how you request, describe the process of your request.

Request_order =GP
Not the default get and post, set to empty why?

Do not know how you request, describe the process of your request.

xxx.php?aaa=bbb

When Request_order is empty, $_request is an empty array,
Request_order = "GP" when $_request only content.


Do not know how you request, describe the process of your request.

xxx.php?aaa=bbb

When Request_order is empty, $_request is an empty array,
Request_order = "GP" when $_request only content.


That's right, look at Request_order's explanation, it sets the $_request variable's setting and the overwrite order. If it is empty, that is, $_request does not contain P (Post), G (Get), and C (Cookie) variables, it is naturally empty.



Do not know how you request, describe the process of your request.

xxx.php?aaa=bbb

When Request_order is empty, $_request is an empty array,
Request_order = "GP" when $_request only content.


That's right, look at Request_order's explanation, it sets the $_request variable's setting and the overwrite order. If it is empty, that is, $_request does not contain P (Post), G (Get), and C (Cookie) variables, it is naturally empty.

What does the following sentence of PHP mean:

If This directive are not set, Variables_order is used for $_request contents.


Not to say empty will use the value of Variables_order?

and php.ini inside said:

626; This directive determines which super global data (G,p,c,e & S) should 627; Be registered into the Super Global array REQUEST. If So, it also determines 628; The order in which this data is registered. The values for this directive is 629; specified in the same manner as the Variables_order directive, EXCEPT one. 630; Leaving this value empty would cause PHP to use the value set in the 631; Variables_order directive. It does not mean it would leave the super Globals 632; Array REQUEST empty. 633; Default Value:none 634; Development Value: "GP" 635; Production Value: "GP" 636; Http://php.net/request-order 637 Request_order = "GP"


Did I get the wrong idea? My English level is poor ...




Do not know how you request, describe the process of your request.

xxx.php?aaa=bbb

When Request_order is empty, $_request is an empty array,
Request_order = "GP" when $_request only content.


That's right, look at Request_order's explanation, it sets the $_request variable's setting and the overwrite order. If it is empty, that is, $_request does not contain P (Post), G (Get), and C (Cookie) variables, it is naturally empty.

What does the following sentence of PHP mean:

If This directive are not set, Variables_order is used for $_request contents.


Not to say empty will use the value of Variables_order?

and php.ini inside said:

626; This directive determines which super global data (G,p,c,e & S) should 627; Be registered into the Super Global array REQUEST. If So, it also determines 628; The order in which this data is registered. The values for this directive is 629; specified in the same manner as the Variables_order directive, EXCEPT one. 630; Leaving this value empty would cause PHP to use the value set in the 631; Variables_order directive. It does not mean it would leave the super Globals 632; Array REQUEST empty. 633; Default Value:none 634; Development Value: "GP" 635; Production Value: "GP" 636; Http://php.net/request-order 637 Request_order = "GP"


Did I get the wrong idea? My English level is poor ...


It's just been tested. Variables_order = "GP"
or Variables_order = "GPCs"
Request_order =
The Request_order value will use the value of Variables_order, as the manual says.
PHP 5.2.17.

More puzzling is, remember changelog in the Request_order is introduced in 5.3, I do not know why 5.2 of the configuration also has the configuration item





Do not know how you request, describe the process of your request.

xxx.php?aaa=bbb

When Request_order is empty, $_request is an empty array,
Request_order = "GP" when $_request only content.


That's right, look at Request_order's explanation, it sets the $_request variable's setting and the overwrite order. If it is empty, that is, $_request does not contain P (Post), G (Get), and C (Cookie) variables, it is naturally empty.

What does the following sentence of PHP mean:

If This directive are not set, Variables_order is used for $_request contents.


Not to say empty will use the value of Variables_order?

and php.ini inside said:

626; This directive determines which super global data (G,p,c,e & S) should 627; Be registered into the Super Global array REQUEST. If So, it also determines 628; The order in which this data is registered. The values for this directive is 629; specified in the same manner as the Variables_order directive, EXCEPT one. 630; Leaving this value empty would cause PHP to use the value set in the 631; Variables_order directive. It does not mean it would leave the super Globals 632; Array REQUEST empty. 633; Default Value:none 634; Development Value: "GP" 635; Production Value: "GP" 636; Http://php.net/request-order 637 Request_order = "GP"


Did I get the wrong idea? My English level is poor ...


It's just been tested. Variables_order = "GP"
or Variables_order = "GPCs"
Request_order =
The Request_order value will use the value of Variables_order, as the manual says.
PHP 5.2.17.

More puzzling is, remember changelog in the Request_order is introduced in 5.3, I do not know why 5.2 of the configuration also has the configuration item

But I use the foreign server PHP 5.3.24 and the local PHP 5.4.4 test results are request_order left blank and will not use the value of Variables_order, but directly leave $_request empty.

Request_order really is 5.3 to introduce, will you set the Request_order did not play a role? Before 5.3 It may be $_request to use the Variables_order directly.

For $_request processing, the earlier version of php5.3 is problematic
At least in PHP 5.3.6, if there is no incoming data, $_request is undefined, not just empty
It's not clear which version of the problem was corrected.


It does not mean it would leave the Super Globals array REQUEST empty.

For $_request processing, the earlier version of php5.3 is problematic
At least in PHP 5.3.6, if there is no incoming data, $_request is undefined, not just empty
It's not clear which version of the problem was corrected.


It does not mean it would leave the Super Globals array REQUEST empty.

The two versions I tested were empty arrays, not undefined,
Just read the ChangeLog also did not mention this, according to the PHP document and PHP.ini above said that there are errors?

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.