<?php
$msg = "";
if($handle = opendir('/Lighty2Go/media/cftt/FT-LOGS')){
 while (false !== ($file = readdir($handle)))
 {
 if (($file != ".")
 && ($file != ".."))
 {
 $msg .= '<li><a href="'.$file.'">'.$file.'</a></li>';
 }
 }
 closedir($handle);
}
?>
<!doctype html>
    <html>
 
    <head>
        <title>SoftAOX | List files and directories inside the specified path in PHP</title>
    </head>
 
    <body>
        <h2>List files and directories inside the specified path in PHP</h2>
        <p>List of files:</p>
        <ul>
            <p>
                <?php echo $msg ?>
            </p>
        </ul>
    </body>
 
    </html>