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