background image

 
$path2 = $path.’/’.$file;  
             if(is_dir($path2))  
             {  
                     echo $file.”\t”;  
                      getdir($path2);  
             }else 
             {  
                 echo $file.”;  
             }  
         }  
     }  
 }  
  getdir($path);  
 
echo ‘<HR>’;  
  
  function get_dir_scandir($path){  
     $tree = array();  
     foreach(scandir($path) as $single){  
         if($single!=’.’ &amp;&amp; $single!=’..’)  
         {  
             $path2 = $path.’/’.$single;  
             if(is_dir($path2))  
             {  
                 echo  $single.”\r\n”;  
                  get_dir_scandir($path2);  
             }else 
             {  
                 echo $single.” \r\n”;  
             }  
         }  
     }  
 }  
get_dir_scandir($path);  
  
echo ‘<HR>’;  
function get_dir_glob(){  
     $tree = array();  
     foreach(glob(‘./curl/*’) as $single){  
         echo $single.”\r\n”;  
     }  
 }