apache_response_headers

(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)

apache_response_headers獲得全部 HTTP 響應頭信息

說明

apache_response_headers(): array|false

獲得全部 HTTP 響應頭信息。 可在 Apache、FastCGI、CLI、FPM 模式下運行。

參數

此函數沒有參數。

返回值

成功時返回包含全部 Apache 響應頭信息的數組, 或者在失敗時返回 false.

范例

示例 #1 apache_response_headers() 示例

<?php
print_r
(apache_response_headers());
?>

以上例程的輸出類似于:

Array
(
    [Accept-Ranges] => bytes
    [X-Powered-By] => PHP/4.3.8
)

參見