i just got involved in php stuffs , execuse me for any confusing terms
I'am using the code below to display files and directories on the current path :
function listFolderFiles($dir){
$ffs = scandir($dir);
echo '<ol>';
foreach($ffs as $ff){
if($ff != '.' && $ff != '..'){
echo '<li>'.$ff;
if(is_dir($dir.'/'.$ff)) listFolderFiles($dir.'/'.$ff); //METHOD To List Files In Directory
echo '</li>';
}
}
echo '</ol>';
}
i'am listing it as a link echo '<li><a href="">'.$ff.'</a>';
i want to be able to take the name of the directories clicked on and enter it display anyhting on it :
function List($DirectoryName){
if(is_dir($dir.'/'.$ff)) listFolderFiles($dir.'/'.$ff);
}
How can i manage to do that and call this function after a directory is clicked on