Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在我的 PHP 脚本中确定 HTTP 请求是 HTTP/1.0 还是 HTTP/1.1 请求,该脚本在 Apache 下运行。有没有办法查询这些信息?
$_SERVER['SERVER_PROTOCOL']如$_SERVER文档:
$_SERVER['SERVER_PROTOCOL']
$_SERVER
'SERVER_PROTOCOL' 请求页面的信息协议的名称和版本;即'HTTP/1.0';
'SERVER_PROTOCOL'
'HTTP/1.0'
另见: