note 108319 added to function.scandir
| From: | twixly at gmail dot com | Date: | Tue, 17 Apr 2012 09:03:37 +0000 |
| Subject: | note 108319 added to function.scandir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-187200@lists.php.net to get a copy of this message | ||
@author Fazle Elahee
I did a simple small change to get rid of all the "/." and "/.." t your
function, since most operations you'd want to do to files don't really need these paths.
In the middle of your function :
if(is_dir($path.DIRECTORY_SEPARATOR.$f) && $f != ".." && $f !=
"."){
scanFileNameRecursivly($path.DIRECTORY_SEPARATOR.$f, &$name);
}else if($f != ".." && $f != "."){
$name[] = $path.DIRECTORY_SEPARATOR.$f;
}
----
Server IP: 69.147.83.197
Probable Submitter: 80.83.210.98
----
Manual Page -- http://www.php.net/manual/en/function.scandir.php
Edit -- https://master.php.net/note/edit/108319
Del: integrated -- https://master.php.net/note/delete/108319/integrated
Del: useless -- https://master.php.net/note/delete/108319/useless
Del: bad code -- https://master.php.net/note/delete/108319/bad+code
Del: spam -- https://master.php.net/note/delete/108319/spam
Del: non-english -- https://master.php.net/note/delete/108319/non-english
Del: in docs -- https://master.php.net/note/delete/108319/in+docs
Del: other reasons-- https://master.php.net/note/delete/108319
Reject -- https://master.php.net/note/reject/108319
Search -- https://master.php.net/manage/user-notes.php