M
Mr Bigs
Guest
Here it is:
function GetFileList($dirname="."){
global $config;
$list = array();
if ($handle = opendir($dirname)) {
while (false !== ($file = readdir($handle))) {
//this matches what type of files to get. jpeg, jpg, gif, png (ignoring case)
if (preg_match("/\.(jpe?g|gif|png)$/i",$file)) {
$list[] = $file;
}
}
closedir($handle);
}
sort($list);
return $list;
}#-#GetFileList()
function GetFileList($dirname="."){
global $config;
$list = array();
if ($handle = opendir($dirname)) {
while (false !== ($file = readdir($handle))) {
//this matches what type of files to get. jpeg, jpg, gif, png (ignoring case)
if (preg_match("/\.(jpe?g|gif|png)$/i",$file)) {
$list[] = $file;
}
}
closedir($handle);
}
sort($list);
return $list;
}#-#GetFileList()