To implement folder traversal output, it is required to use red for folders and blue for files, and to have hierarchical indentation with four spaces,
function myscandir($dir){
//Judge whether the path is valid
//is_dir($dir) or die('Currently is not a directory');
echo $dir,'< /br>';
if (is_dir($dir)) {
# code...
echo ' '.' '.' ';
$files = scandir($dir);
foreach ($files as $file) {