Using filemtime() to figure out when any part of ENTIRE site was last updated?

Discussion in 'PHP' started by gbh, Dec 13, 2008.

  1. #1
    I thought I could just do it as simple as
    $LM = "Last Modified: " . date ("F d Y H:i:s.", filemtime('/'));
    PHP:
    But on my server that is throwing "Last Modified: July 30 2008 09:48:41". No idea where on earth it is getting July from? :eek: Anyway, how can I make it check the root directory?
     
    gbh, Dec 13, 2008 IP
  2. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #2
    Maybe clear the cache? http://uk2.php.net/manual/en/function.clearstatcache.php

    Although most likely it's just returning when the directory was last modified, loop through all the files in the folder and get the most recent filemtime for the last time any file in the directory was updated.
     
    Danltn, Dec 14, 2008 IP