PHP array of folders in directory and show files in each folder
问题 I am using the following code to list all folders in a directory (called test), and all files within those folders: <?php function listFolderFiles($dir){ $ffs = scandir($dir); echo '<ol>'; foreach($ffs as $ff){ if($ff != '.' && $ff != '..'){ echo '<li class="title">'.$ff; if(is_dir($dir.'/'.$ff)) listFolderFiles($dir.'/'.$ff); echo '</li>'; } } echo '</ol>'; } listFolderFiles('test'); ?> This works fine, however I want to be able to link to each file in those folders. Can anyone tell me how I