ok - what i have been trying to accomplish for a while now is, that i would like to have the "last updated" timestamp on the frontpage of my site. this timestamp should be the date and time of the php file which was updated last.

now - i suppose i will do this by running a cron job and store the calue in the database, so i dont have to recurse the tree every time when the site is called and add to the rendering time.

basically it should work like this i suppose: walk through the dir-tree, check each files last updated time and simply store the highest value. sounds easy, but i havent been able to figure it out yet - the main problem is, how to get the last updated date...

i browsed the board, but havent been able to come up with a working solution yet.

thanks in advance!
sid

    //
    Use the following script to write the last updated date of the document.

    <HTML>
    <HEAD>
    </HEAD>
    <BODY>
    <script>
    datUpdated = new Date(document.lastModified) ;
    datMonth = datUpdated.getMonth() + 1 ;
    datDate = datUpdated.getDate() ;
    datYear = datUpdated.getYear() ;
    document.write("<i>Last Updated: " + datMonth + "/" + datDate + "/" + datYear + "</i>") ;
    </script>
    //

    just do a simple search on javascript lat update date.

    sorry its not php. but same function

      thanks for the answer, but its really not what i need...

        Write a Reply...