DirectoryIterator
在线手册:中文 英文
PHP手册

DirectoryIterator::getExtension

(No version information available, might only be in SVN)

DirectoryIterator::getExtensionReturns the file extension component of path

说明

public string DirectoryIterator::getExtension ( void )

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值


DirectoryIterator
在线手册:中文 英文
PHP手册
PHP手册 - N: Returns the file extension component of path

用户评论:

andresdzphp at php dot net (19-Sep-2011 08:04)

DirectoryIterator::getExtension Example

<?php
$dir
= new DirectoryIterator(dirname(__FILE__));
foreach (
$dir as $fileinfo) {
    if (!
$fileinfo->isDot()) {
        echo
$fileinfo->getExtension() . "\n";
    }
}
?>

Result:

php
gif
png
php
jpg