Suppose I have a directory look like:
ABC |_ a1.txt |_ a2.txt |_ a3.txt |_ a4.txt |_ a5.txt
How can I use PHP to get these file names to an
Try this:
if ($handle = opendir('.')) { $files=array(); while (false !== ($file = readdir($handle))) { if(is_file($file)){ $files[]=$file; } } closedir($handle); }