Content-length and other HTTP headers?

前端 未结 6 1410
时光取名叫无心
时光取名叫无心 2020-12-05 10:45

Does it give me any advantage if I set this header when generating normal HTML pages?

I see that some frameworks out there will set this header property and I was wo

6条回答
  •  [愿得一人]
    2020-12-05 11:25

    The best way (that is working for me) of getting size of a remote file:

    $head = array_change_key_case(get_headers($file, TRUE));
    $filesize = $head['content-length'];
    

提交回复
热议问题