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


    。。

  • 相关阅读:
    poj 1182食物链
    几何原本查询程序1.0
    code forces 548C:Mike and frog
    CC2530串口通信
    CC2530定时器的应用
    CC2530应用——按键控制灯光状态变化
    步入LTE、多址技术
    定时器之基于模模式的间隔定时
    CC2530定时器
    配置路由器(1)
  • 原文地址:https://www.cnblogs.com/derrck/p/1948555.html
Copyright © 2011-2022 走看看