1
我是用来get_headers()函数PHP get_headers结果来显示
`$`url = 'http://stackoverflow.com';
$s=get_headers(`$`url, 1);
print_r(`$`s);
然后我得到像
Array ([0] => HTTP/1.1 200 OK [Cache-Control] => public, max-age=27 [Content-Type] => text/html; charset=utf-8 [Expires] => Mon, 07 Nov 2011 13:44:38 GMT [Last-Modified] => Mon, 07 Nov 2011 13:43:38 GMT [Vary] => * [Date] => Mon, 07 Nov 2011 13:44:10 GMT [Connection] => close [Content-Length] => 195251)
输出如何显示像
缓存控制:
内容类型:
过期:
上次修改:
连接:
的Content-Length:
所以你得到的数组,你问如何显示阵列的价值?看起来好像在这里问了30秒之前应该查看的东西。链接,让你开始:[http://www.tizag.com/phpT/arrays.php](http://www.tizag.com/phpT/arrays.php) – Dave
'get_headers'不一致:http:// stackoverflow.com/questions/12781795/get-headers-inconsistency – Baba