gpt4 book ai didi

PHP: $_SERVER ['REDIRECT_URL' ] 对比 $_SERVER ['REQUEST_URI' ]

转载 作者:IT王子 更新时间:2023-10-29 01:00:12 29 4
gpt4 key购买 nike

我打印了 $_SERVER,发现 $_SERVER['REDIRECT_URL']$_SERVER['REQUEST_URI'] 的值相同。两者有什么区别?

最佳答案

REQUEST_URIHTTP request line 中使用的请求 URI 路径和查询。 . REDIRECT_URL is created by Apache当内部重定向发生时:

REDIRECT_ environment variables are created from the environment variables which existed prior to the redirect. They are renamed with a REDIRECT_ prefix, i.e., HTTP_USER_AGENT becomes REDIRECT_HTTP_USER_AGENT.

REDIRECT_URL, REDIRECT_STATUS, and REDIRECT_QUERY_STRING are guaranteed to be set, and the other headers will be set only if they existed prior to the error condition.

请注意,REDIRECT_URL 只包含 URI 路径。

关于PHP: $_SERVER ['REDIRECT_URL' ] 对比 $_SERVER ['REQUEST_URI' ],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6483912/

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