This will put the files into a file list and not the sub-directories.
<?php
//Set to the dir you want to read from
$dir = ".";
$handle = opendir($dir);
while ($file = readdir($handle))
{
if (($file != ".") && ($file != "..") && !(is_dir($file))
{
$filelist[] = $file;
}
}
?>