dbahlmann (AT) gmail (DOT) com wrote:
Quote:
Hi,
I'm using document.lastModified function to return my document last
mod date. The function returns 1-Jan-1970. The problem seems to be
that the file name is index.php instead of index.html. I have some php
includes in the index files. When I change the php file to htm file
the lastModified function works correctly.
Any help?
Thanks |
Not really a Javascript issue, but try putting this at the very top of
your PHP document (MUST be before any whitespace or anything else, or it
won't work):
<?php header("Last-Modified: " . date('D, d M Y H:i:s T',
filemtime(__FILE__)); ?>
(You can also try getlastmod() instead of the filemtime() call, but
there are complaints about it failing under certain conditions).
Jeremy