note 64196 added to function.directoryiterator-gettype
| From: | boards at gmail dot com | Date: | Sun, 09 Apr 2006 16:09:22 +0000 |
| Subject: | note 64196 added to function.directoryiterator-gettype | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-107645@lists.php.net to get a copy of this message | ||
Note that this function returns the file type (e.g. "file", "dir", etc.) and not
the MIME type. To do that, you might want to use this:
<?php
for
(
$dir = new DirectoryIterator('/some/directory');
$dir->valid();
$dir->next()
)
{
$mime = mime_content_type($dir->getPathname());
}
?>
----
Server IP: 216.194.113.175
Probable Submitter: 71.228.25.94
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.directoryiterator-gettype.php
Edit -- http://master.php.net/note/edit/64196
Del: integrated -- http://master.php.net/note/delete/64196/integrated
Del: useless -- http://master.php.net/note/delete/64196/useless
Del: bad code -- http://master.php.net/note/delete/64196/bad+code
Del: spam -- http://master.php.net/note/delete/64196/spam
Del: non-english -- http://master.php.net/note/delete/64196/non-english
Del: in docs -- http://master.php.net/note/delete/64196/in+docs
Del: other reasons-- http://master.php.net/note/delete/64196
Reject -- http://master.php.net/note/reject/64196
Search -- http://master.php.net/manage/user-notes.php