Jump to content


Photo

Getting date script was last modified


  • Please log in to reply
1 reply to this topic

#1 king arthur

king arthur
  • Members
  • PipPipPip
  • Advanced Member
  • 335 posts
  • LocationUK HQ

Posted 20 June 2006 - 09:57 PM

I have a piece of javascript on one of my pages which displays the date the page was last modified, the important bit is:

dateUpdated = new Date(document.lastModified);

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?
Sir Isaac Newton said "If I have seen farther, it is by standing on the shoulders of giants". But it is not recorded as to whether he said it before or after he was hit on the head by a falling apple.

#2 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 20 June 2006 - 09:59 PM

You can do it like so...
$updated = date("F d Y H:i:s.", getlastmod());





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users