Список PHP *файлы
foreach(glob(IMAGEPATH.'*') as $filename){
echo basename($filename) . "\n";
}
Other God
foreach(glob(IMAGEPATH.'*') as $filename){
echo basename($filename) . "\n";
}