Home >php教程 >php手册 >php遍历目录代码

php遍历目录代码

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 19:37:571096browse

无详细内容 无 ?php/* * dir */ if ($handle = opendir( 'D:/nginx-1.6.2/html/testphp')){ echo "Directory handle: $handle br/" ; echo "Files: br/" ; /* 遍历目录 */ while ( false !== ( $file = readdir( $handle ))){ echo " $file br/" ; } closedir

<?php
/*
 * dir
 */
 
if ($handle  =  opendir( &#39;D:/nginx-1.6.2/html/testphp&#39;)){
    echo  "Directory handle:  $handle <br/>" ;
    echo  "Files: <br/>" ;
    
     /* 遍历目录 */
     while ( false  !== ( $file  =  readdir( $handle ))){
        echo  " $file <br/>" ;
    }
     closedir( $handle );
} else {
    echo  "Directory opened false" ;
}


?>
Statement:
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