Need to find newest file in dirs

From: Date: Thu, 08 Aug 2002 14:55:09 +0000
Subject: Need to find newest file in dirs
Groups: php.general 
Request: Send a blank email to php-general+get-111662@lists.php.net to get a copy of this message
Hello all. I have a number of directories into which users can deposit pictures which are displayed on the Web through a PHP viewer I wrote. I'd like to add the ability to show which user was the last to upload a file to their directory so that as you visit the site you can see where new files are without looking through every user's picture directory. The directory structure is dynamic; user's dirs come and go, and their contents change. Here is the current structure: dir pics |-- User1 |-- User2 |-- User3 The end result I am looking for is the directory name which contains the newest *.gif or *.jpg file. Then I'll either colour-code the username on the web site or just print a line saying "Last upload: August 10, 2002 by User1". Any help would be appreciated! Thanks.. MikeC

« previous php.general (#111662) next »