Results 1 to 3 of 3

Thread: Script to show last time a file was modified

  1. #1
    Join Date
    Apr 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Script to show last time a file was modified

    I currently have a few files that are linked off a main page. I'm looking for a script that can tell me what date/time the linked page was last updated.

    Example:
    On page index.html I have a link to random.zip in a menu on the left. On index.html I would like to have text undernearth the random.zip link showing the last date/time that the file was modified (taken from the file timestamp on the server).

    Is this possible with JavaScript, or should I try PHP?

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    PHP, definitely.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Just to add to your options, you could also use SSI (server side includes) if your page is .shtml extension. Something like:

    Code:
    greenday.mp3 last modified: <!--#flastmod file="grenday.mp3"-->

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •