PHP
downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

DirectoryIterator::isDir> <DirectoryIterator::getSize
Last updated: Fri, 26 Dec 2008

view this page in

DirectoryIterator::getType

(PHP 5 >= 5.0.2)

DirectoryIterator::getTypeRécupère le type d'un fichier

Description

string DirectoryIterator::getType ( void )
Avertissement

Cette fonction n'est pas documentée et seule la liste des arguments est disponible.

Récupère le type d'un fichier.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Le type du fichier.



add a note add a note User Contributed Notes
DirectoryIterator::getType
boards at gmail dot com
09-Apr-2006 06:09
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::isDir> <DirectoryIterator::getSize
Last updated: Fri, 26 Dec 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites