【问题标题】:Check last modifed from remote file's header in case of IIS在 IIS 的情况下检查远程文件头的最后修改
【发布时间】:2011-10-09 09:00:35
【问题描述】:

为什么 IIS 不返回文件的最后修改时间日期?

Array (
    [headers] => Array (
        [Date] => Sun, 09 Oct 2011 08:57:43 GMT
        [Server] => Microsoft-IIS/6.0
        [X-Powered-By] => ASP.NET
        [X-AspNet-Version] => 2.0.50727
        [Location] => /home.aspx
        [Cache-Control] => private
        [Content-Type] => text/html; charset=iso-8859-1
        [Content-Length] => 129
    )
    [info] => Array (
        [url] => http://www.adleradelboden.ch/webcam/Adler000.JPG
        [content_type] => text/html; charset=iso-8859-1
        [http_code] => 302
        [header_size] => 250
        [request_size] => 220
        [filetime] => -1
        [ssl_verify_result] => 0
        [redirect_count] => 0
        [total_time] => 0.077872
        [namelookup_time] => 0.041748
        [connect_time] => 0.058456
        [pretransfer_time] => 0.058463
        [size_upload] => 0
        [size_download] => 129
        [speed_download] => 1656
        [speed_upload] => 0
        [download_content_length] => 129
        [upload_content_length] => 0
        [starttransfer_time] => 0.077829
        [redirect_time] => 0
        [certinfo] => Array ( )
    )
    [curl_handle] => Resource id #5
)

【问题讨论】:

    标签: php http-headers last-modified


    【解决方案1】:

    http://www.adleradelboden.ch/webcam/Adler000.JPG 的响应标头:

    HTTP/1.1 200 OK
    Content-Length: 59080
    Content-Type: image/jpeg
    Last-Modified: Sun, 09 Oct 2011 09:32:42 GMT
    Accept-Ranges: bytes
    ETag: "d7df1646686cc1:d2487"
    Server: Microsoft-IIS/6.0
    X-Powered-By: ASP.NET
    Date: Sun, 09 Oct 2011 09:40:24 GMT
    

    有 Last-Modified 标头。

    您尚未向我们展示如何获取此信息。但是通过查看您收到的标头,有 Location 标头,因此您的请求正在被重定向。您应该将 curl 设置为跟随位置

    【讨论】:

      猜你喜欢
      • 2013-07-22
      • 2011-12-03
      • 1970-01-01
      • 2016-08-01
      • 2011-03-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多