2016-05-20 11 views

答えて

0

あなたがglob()機能を試すことができます。

print_r(glob("*.mp3")); 
0

これはあなたのサブディレクトリを含むすべてのファイルを提供します。

$ Regexには、必要なすべてのファイルの単一のインデックス配列があります。

<?php  
$Directory = new RecursiveDirectoryIterator('path/to/project/'); 
$Iterator = new RecursiveIteratorIterator($Directory); 
$Regex = new RegexIterator($Iterator, '/^.+\.mp3$/i', RecursiveRegexIterator::GET_MATCH); 
?> 
関連する問題