king arthur Posted June 20, 2006 Share Posted June 20, 2006 I have a piece of javascript on one of my pages which displays the date the page was last modified, the important bit is:[code]dateUpdated = new Date(document.lastModified);[/code]I want to replace this with PHP but I haven't as yet come across a function that can get me the date the current script, or any arbitrary file, was last modified. Is there one? Is there a superglobal that has the info I want? Link to comment https://forums.phpfreaks.com/topic/12491-getting-date-script-was-last-modified/ Share on other sites More sharing options...
zq29 Posted June 20, 2006 Share Posted June 20, 2006 You can do it like so...[code]$updated = date("F d Y H:i:s.", getlastmod());[/code] Link to comment https://forums.phpfreaks.com/topic/12491-getting-date-script-was-last-modified/#findComment-47809 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.