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; }   
             }   
         }   
     }   


    。。

  • 相关阅读:
    致橡树——舒婷
    MPU6050
    Android自动折行TextView Group
    基于LRU Cache的简单缓存
    如果不能给心以翅膀,她如何飞翔
    ubuntu手机识别
    Webkit JNI
    scrapy入门
    Webkit二:RenderTree 创建
    Webkit一:Dom转码和解析
  • 原文地址:https://www.cnblogs.com/derrck/p/1948555.html
Copyright © 2011-2022 走看看