mirror of
https://github.com/c0de-archive/GAMA-Site.git
synced 2025-07-30 12:50:17 +00:00
Added └ character for better distinction between files and dirs
This commit is contained in:
@@ -14,12 +14,12 @@ function getDirectory( $path = '.', $level = 0 ){
|
|||||||
// show the directory tree.
|
// show the directory tree.
|
||||||
if( is_dir( "$path/$file" ) ){
|
if( is_dir( "$path/$file" ) ){
|
||||||
// Its a directory, so we need to keep reading down...
|
// Its a directory, so we need to keep reading down...
|
||||||
echo "<strong>$spaces <a href='$path/$file'>$file</a></strong><br />";
|
echo "<strong>$spaces └ <a href='$path/$file'>$file</a></strong><br />";
|
||||||
getDirectory( "$path/$file", ($level+1) );
|
getDirectory( "$path/$file", ($level+1) );
|
||||||
// Re-call this same function but on a new directory.
|
// Re-call this same function but on a new directory.
|
||||||
// this is what makes function recursive.
|
// this is what makes function recursive.
|
||||||
} else {
|
} else {
|
||||||
echo "$spaces <a href='$path/$file'>$file</a><br />";
|
echo "$spaces └ <a href='$path/$file'>$file</a><br />";
|
||||||
// Just print out the filename
|
// Just print out the filename
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user