note 59249 deleted from function.opendir by cmb

From: Date: Tue, 11 Jun 2019 06:43:07 +0000
Subject: note 59249 deleted from function.opendir by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-211232@lists.php.net to get a copy of this message
Note Submitter: neale-php at woozle dot org ---- oryan's example is still sub-optimal, even if people using it never ever substitute a variable for directory. Just use PHP's glob() function, which will be faster and more efficient anyway since it doesn't have to launch a shell and run the ls program (that's what the shell_exec does). $result = glob("directory/*");

« previous php.notes (#211232) next »