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


    。。

  • 相关阅读:
    ElasticSearch安装中遇到的一些问题
    微信扫描二维码下载问题
    nginx截获客户端请求
    Nginx中的一些匹配顺序
    Redis-cli命令最新总结
    RabbitMQ服务安装配置
    Nginx服务状态监控
    使用Sqlserver更新锁防止数据脏读
    PHPStorm IDE 快捷键(MAC)
    MongoDB 安装
  • 原文地址:https://www.cnblogs.com/derrck/p/1948555.html
Copyright © 2011-2022 走看看