开发者

When I use javascript:alert(document.lastModified) alert appears, but no information enclosed

When I use the following, javascript:alert(document.lastModified),开发者_如何学C in Chrome to check whether my site was updated, the alert dialog box appears, but there is no content within the box. My page is powered by PHP, therefore it should display the time and date of page request should it not?


PHP-generated pages don't have last-modified dates. They're dynamically generated, so by definition their last-modified data is "now", regardless of how much dynamic data is actually served, or if the output hasn't changed since the last time. You'd have to set a last-modified header yourself, using header().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜