NYCPHP Meetup

NYPHP.org

[nycphp-talk] Checking active sessions

David Krings ramons at gmx.net
Mon Apr 30 22:12:59 EDT 2007


David Krings wrote:
> The manual doesn't explicitly state if filemtime works on directories as 
> well. I then could get all directories and check for their timestamp 
> rather than hitting the database a few times for this. And it will save 
> me from making yet another table. I will try this out.
> 
Someone else already did:
To get the last modification time of a directory, you can use this:
$getLastModDir = filemtime("/path/to/directory/.");
Take note on the last dot which is needed to see the directory as a file 
and to actually get a last modification date of it.
This comes in handy when you want just one 'last updated' message on the 
frontpage of your website and still taking all files of your website 
into account.
Regards,
Frank Keijzers

from http://terra.di.fct.unl.pt/docs/php/function.filemtime.php.htm


Looks as if I'm all set. :)

David



More information about the talk mailing list