zoukankan      html  css  js  c++  java
  • 循环文件夹下的文件

    。。

    代码
     function file_list ( $path )   
     {   
         
    if ( $handle = opendir ( $path ))   
         {   
             
    while ( false !==  ( $file = readdir  ( $handle )))   
             {   
               
    & nbsp; if  ( $file != "." && $file != ".." )   
               
    &nbs p; {   
               
    & nbsp;     if ( is_dir ( $path . "/" . $file ))   
               
    &nbs p;     {   
               
    & nbsp;         echo $path . " : " . $file . " <br> " ; //去掉此行显示的是所有的非目录文件   
               &nbs p;         file_list  ( $path . "/" . $file ) ;   
               
    & nbsp;     } else  
               
    &nbs p;     {   
               
    & nbsp;         echo $path . " : " . $file . " <br> " ;   
               
    &nbs p;     }   
               
    & nbsp; }   
             }   
         }   
     }   


    。。

  • 相关阅读:
    61序列化二叉树
    60把二叉树打印成多行
    59按之字形顺序打印二叉树
    58对称的二叉树
    57二叉树的下一个结点
    56删除链表中重复的结点
    55链表中环的入口结点
    Python100天打卡-Day10
    Python100天打卡
    点至直线的距离和垂足点计算
  • 原文地址:https://www.cnblogs.com/derrck/p/1948555.html
Copyright © 2011-2022 走看看