使用scandir()函数查看当前目录下的所有内容

$dir_info = scandir('./');
foreach ($dir_info as $file) {
echo $file . '<br>';
}