Log in

View Full Version : Script to show last time a file was modified



SimianPirate
04-04-2006, 07:25 PM
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?

Twey
04-04-2006, 08:09 PM
PHP, definitely.

ddadmin
04-05-2006, 06:52 AM
Just to add to your options, you could also use SSI (server side includes) if your page is .shtml extension. Something like:


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