Re: sorting directory contents

From: Date: Mon, 11 Sep 2000 06:11:21 +0000
Subject: Re: sorting directory contents
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-16123@lists.php.net to get a copy of this message
"WILSON, Nick" wrote: > You could use a system command via exec, ie > exec("ls -1", $dirlist); > > Assuming you are running on a *nix system. If you are going to do that you might as well read the dir in PHP and sort it there and save yourself the overhead of invoking an external command, making it UNIX dependant, filtering out '.' and '..' etc etc. Joseph, bite the bullet and do it in PHP. Sooner or later something will have to read the whole list into memory... I'll take a chill-pill now. -- Simon Edwards Animated Design, Melbourne http://www.animated.net.au/ Ph: (03) 98850990

« previous php.general (#16123) next »