当我在域中进行更改时,函数get_headers()
不会给出具有相同索引的数组。何时以及为什么会发生这种情况?
我想要Content-Length
数百个域的价值。我需要做哪些改变?
<?php
$url = 'http://www.ecomexpomelbourne.com.au/sponsors/';
echo "<pre>";
$domain_data[] = array();
$domain_data = get_headers( $url, 1 );
print_r($domain_data);
echo $domain_data['Last-Modified'];
?>
当用于当前页面 url 时,我得到 Content-Length 索引