PHP:apache_response_headers函数

apache_response_headers 函数用于返回 Apache Web 服务器发送的某些 HTTP 响应标头,但它不会显示 Apache 控制的所有标头,因此可能不是很有用。

该函数或者在成功时返回关联数组,或者在失败时返回 false; 返回的数组包含键值对以便于解析。

使用示例:

$apache_headers = apache_response_headers();
var_dump($apache_headers);

输出:

array(2) {
  ["Upgrade"]=>
  string(6) "h2,h2c"
  ["Connection"]=>
  string(7) "Upgrade"
}
日期:2020-06-02 22:15:25 来源:oir作者:oir