- 论坛徽章:
- 0
|
php的代码如下:- $url = 'http://localhost/php/ok.html';
- $headInf = get_headers($url, 1);
- print_r($headInf);
复制代码 输出:
Array
(
[0] => HTTP/1.1 200 OK
[Date] => Sun, 11 Mar 2012 13:23:09 GMT
[Server] => Apache/2.2.20 (Ubuntu)
[Last-Modified] => Sat, 25 Feb 2012 14:27:49 GMT
[ETag] => "81135-4-4b9caae86db3a"
[Accept-Ranges] => bytes
[Content-Length] => 4
[Vary] => Accept-Encoding
[Connection] => close
[Content-Type] => text/html
)
但是我把$url='http://localhost/phpinfo.php' 之后
输出:
Array
(
[0] => HTTP/1.1 200 OK
[Date] => Sun, 11 Mar 2012 13:27:32 GMT
[Server] => Apache/2.2.20 (Ubuntu)
[X-Powered-By] => PHP/5.3.6-13ubuntu3.6
[Vary] => Accept-Encoding
[Connection] => close
[Content-Type] => text/html
)
这次为什么没有 Last-Modified呢?? |
|