I am trying to set up a page (or two) within php with a simple line that indicates when the page had been last modified.
What I'm encountering is that the 'modified' date is always changing to the present date. If it says it's Monday when it was modified last, had not been changed since, tomorrow it'll say Tuesday and so on (always the present date).
Is there not a way to keep this as Monday? Here is the code:
update = new Date(document.lastModified);
theMonth = update.getMonth() + 1;
theDate = update.getDate();
theYear = update.getFullYear();
document.writeln("<I>Last updated:" + theMonth + "/" + theDate + "/" + theYear + "</I>");
This is working in files with a "html" extension, but not the "php" extension such as LastChanged.html versus LastChanged.php.
Is there a way to show the lastModified date in php and have the same effect as it would in an html file? Or am I forced
to set the file as an html file?