RE: [PHP] sorting directory contents

From: Date: Mon, 11 Sep 2000 02:12:47 +0000
Subject: RE: [PHP] sorting directory contents
Groups: php.general 
Request: Send a blank email to php-general+get-16105@lists.php.net to get a copy of this message
You could use a system command via exec, ie exec("ls -1", $dirlist); Assuming you are running on a *nix system. > -----Original Message----- > From: Wizaerd [mailto:wizaerd@wizaerd.com] > Sent: Monday, 11 September 2000 11:49 > To: General PHP List > Subject: [PHP] sorting directory contents > > > I'm building a script that reads an image directory, > outputting the name of > the image, the dimensions of the image as well as it's size. > It's using > opendir() and readdir(), but readdir() doesn't return the > directory back in > any particular order. I'm not storing the results to an array because > ultimately there could be thousands of images, and I'd like > to save the > memory overhead of building then sorting such a large array. > > So is there anyway to just read the results of an opendir() > that is sorted > by filename? > > Thanx! > > Joseph E. Sheble > a.k.a. Wizaerd > Wizaerd's Realm > Canvas, 3D, Graphics, ColdFusion > http://www.wizaerd.com > ================================= > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > >

« previous php.general (#16105) next »