함수 get_headers()
은 도메인을 변경할 때 동일한 인덱스를 가진 배열을 제공하지 않습니다. 언제 그리고 왜 이것이 발생합니까?get_headers()가 Content-Length 요소를 반환하지 않습니다.
도메인 수 백 개에 대해 Content-Length
값을 원합니다. 어떤 변화가 필요합니까? 현재 페이지의 URL에 사용
<?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'];
?>
나는 가끔 서버가 단지 Content-length
헤더를 보내지 않습니다 콘텐츠 길이 인덱스
에게 서버 구성과는 아마 뭔가를이 없습니다. –
서버가 Content-Length를 보내지 않아 얻을 것이 없습니다 – mleko
헤더가 없습니다 ... https://requestable.pieterhordijk.com/4rCuvc – PeeHaa