php遍历文件夹(取得文件名)

WBOY
Release: 2016-06-13 10:38:30
Original
1315 people have browsed it

php遍历文件夹(获得文件名)
http://www.cublog.cn/u1/43167/showart_374765.html

function listFile($dir){  $fileArray = array(); $cFileNameArray = array(); if($handle = opendir($dir)) {  while(($file = readdir($handle)) !== false)  {    if($file !="." && $file !="..")   {     if(is_dir($dir."\\".$file))    {      $cFileNameArray = listFile($dir."\\".$file);      for($i=0;$i<count else return echo listfile chm var_dump><div class="clear">
                 
              
              
        
            </div></count>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template