note 81735 added to function.scandir
| From: | Mechkurt at osu1 dot php dot net | Date: | Tue, 11 Mar 2008 16:39:37 +0000 |
| Subject: | note 81735 added to function.scandir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136938@lists.php.net to get a copy of this message | ||
foreach(scandir('.') as $f) {
if ($f[0]=='.') continue;
//Do your dirty work code monkey
}
Actualy if you do that, you could skip files that do start with a dot (like .htaccess for
example)...
File name comparaison with '.' and '..' could seem dirty but for me it does the
job ;-)
----
Server IP: 217.174.223.124
Probable Submitter: 80.13.69.25
----
Manual Page -- http://www.php.net/manual/en/function.scandir.php
Edit -- https://master.php.net/note/edit/81735
Del: integrated -- https://master.php.net/note/delete/81735/integrated
Del: useless -- https://master.php.net/note/delete/81735/useless
Del: bad code -- https://master.php.net/note/delete/81735/bad+code
Del: spam -- https://master.php.net/note/delete/81735/spam
Del: non-english -- https://master.php.net/note/delete/81735/non-english
Del: in docs -- https://master.php.net/note/delete/81735/in+docs
Del: other reasons-- https://master.php.net/note/delete/81735
Reject -- https://master.php.net/note/reject/81735
Search -- https://master.php.net/manage/user-notes.php