gpt4 book ai didi

php - PHP中 "EGPCS"是什么意思?

转载 作者:行者123 更新时间:2023-12-02 23:16:40 27 4
gpt4 key购买 nike

我在php.ini中找到了以下代码。这是什么意思?

“PHP 寄存器”——那是什么?

; This directive describes the order in which PHP registers GET, POST, Cookie,; Environment and Built-in variables (G, P, C, E & S respectively, often; referred to as EGPCS or GPC).  Registration is done from left to right, newer; values override older values.variables_order = "EGPCS"

最佳答案

有关该指令的手册可能会对您有更多帮助:variables_order (引用):

Sets the order of the EGPCS (Environment, Get, Post, Cookie, and Server) variable parsing. For example, if variables_order is set to "SP" then PHP will create the superglobals $_SERVER and $_POST, but not create $_ENV, $_GET, and $_COOKIE. Setting to "" means no superglobals will be set.

另请注意(再次引用):

The content and order of $_REQUEST is also affected by this directive.

我想这个选项不久前更重要,当时 register_globals 仍然被使用,正如同一页面所述(引用):

If the deprecated register_globals directive is on (removed as of PHP 6.0.0), then variables_order also configures the order the ENV, GET, POST, COOKIE and SERVER variables are populated in global scope. So for example if variables_order is set to "EGPCS", register_globals is enabled, and both $_GET['action'] and $_POST['action'] are set, then $action will contain the value of $_POST['action'] as P comes after G in our example directive value.

我看不出可以添加什么;这有帮助吗?
或者这是否会给您带来问题?

关于php - PHP中 "EGPCS"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1312871/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com