note 42724 added to function.scandir

From: Date: Thu, 27 May 2004 08:03:15 +0000
Subject: note 42724 added to function.scandir
Groups: php.notes 
Request: Send a blank email to php-notes+get-70165@lists.php.net to get a copy of this message
Here's a simpler scandir replacement for those using < PHP 5 on a Unix box. <?php if(!function_exists('scandir')){ function scandir($directory){ return explode("\n", trim(shell_exec("ls " . $directory))); } } ?> ---- Manual Page -- http://www.php.net/manual/en/function.scandir.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42724 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42724&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42724&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#70165) next »