首页 话题 小组 问答 好文 用户 我的社区 域名交易 唠叨

[函数]apache_response_headers()函数—用法及示例

发布于 2025-04-18 10:42:09
0
41

适用php版本(PHP 4 >= 4.3.0, PHP 5, PHP 7)

描述

array apache_response_headers ( void )

获取所有 HTTP 响应标头。 

返回值
成功所有Apache响应标头的数组或失败时返回FALSE。

更新日志

版本

描述

5.5.7

此功能在 CLI 服务器中可用。

5.4.0

该功能在 FastCGI 下可用。以前,当PHP作为Apache模块安装时,或者通过Netscape/iPlanet/SunONE Web 服务器中的 NSAPI 服务器模块安装。

示例

示例#1 apache_response_headers()示例

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

上面的例子会输出类似于:

Array
(
    [Accept-Ranges] => bytes
    [X-Powered-By] => PHP/4.3.8
)
评论
一个月内的热帖推荐
啊龙
Lv.1普通用户

9545

帖子

31

小组

3242

积分

赞助商广告
站长交流