獲得全部 HTTP 響應頭資訊

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
)

參見

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *