You are looking for the command scandir.
$path="/tmp";
$files = scandir($path);
Following code will remove . and .. from the returned array from scandir:
$files = array_diff(scandir($path), array('.', '..'));
You are looking for the command scandir.
$path="/tmp";
$files = scandir($path);
Following code will remove . and .. from the returned array from scandir:
$files = array_diff(scandir($path), array('.', '..'));