"highest" file

From: Date: Sat, 03 Mar 2001 02:46:05 +0000
Subject: "highest" file
Groups: php.general 
Request: Send a blank email to php-general+get-42420@lists.php.net to get a copy of this message
hey, given a directory structure like $DOCUMENT_ROOT/2001/03/02 (where 02 is a file in dir 03/ which obviously represents a date, i would like to implement a page such as latest.php, which will go to $DOCUMENT_ROOT, list all the directories, sort them numerically, choose the largest, chdir, repeat, chdir, and obtain the name of the file that is associated with the "highest" number. this is related to an announcement page, where a central page display.php handles the date directory tree. sometimes, there are releases on consecutive days, but it may happen that an announcement is a couple of days back, in which case i want latest.php to find it automatically and dynamically. any hints? martin [greetings from the heart of the sun]# echo madduck@!#:1:s@\@@@.net -- "when I was a boy I was told that anybody could become president. now i'm beginning to believe it." -- clarence darrow

« previous php.general (#42420) next »