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());
}
?>
DirectoryIterator::getType
(PHP 5 >= 5.0.2)
DirectoryIterator::getType — Get file type
Описание
string DirectoryIterator::getType
( void
)
Внимание
К настоящему времени эта функция еще не была документирована; для ознакомления доступен только список аргументов.
Get the file type.
Список параметров
This function has no parameters.
Возвращаемые значения
The type of the file.
DirectoryIterator::getType
boards at gmail dot com
09-Apr-2006 06:09
09-Apr-2006 06:09
