Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file last modified

Status
Not open for further replies.

IDTstudios1

Programmer
Aug 8, 2004
72
US
Could someone please tell me how to check if a file was modified less than X number minutes ago. I can get dates to work but not minutes. basically I need this:

if (string.txt = modified < 30 minutes ago)
{

}
else
{

}

Any input would be great, thanks.
 
You can use filemtime() but this function caches the result.
So put in a clearstatcache() to clear it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top