我在 PHP 中使用 get_headers 函数从本地服务器中的网站请求标头在我的网站中使用时返回数组不返回数组
退货示例
在本地服务器中
大批
(
[0] => HTTP/1.1 301 已移动
[服务器] => 数组
(
[0] => nginx/0.7.42
[1] => Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
[2] => Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
[3] => 微软-IIS/7.0
)
[内容类型] => 数组
(
[0] => 文本/html;字符集=utf-8
[1] => 文本/html;字符集=iso-8859-1
[2] => 文本/html
[3] => 文本/html;字符集=utf-8
)
[位置] => 数组
(
[0] => http//3.ly/aXP
[1] => http//3.ly/aXP/
[2] => http//stackoverflow.com
)
[MIME 版本] => 1.0
[内容长度] => 数组
(
[0] => 277
[1] => 376
[2] => 0
[3] => 122213
)
)
在真实服务器中
大批
(
[0] => HTTP/1.1 301 已移动
[服务器] => nginx/0.7.42
[日期] => 2009 年 10 月 10 日星期六 03:15:32 GMT
[内容类型] => 文本/html;字符集=utf-8
[连接] => 保持活动状态
[位置] => http//3.ly/aXP
[MIME 版本] => 1.0
[内容长度] => 277
)
我不会返回数组
谢谢....