标签:style 循环 file read open int code end php基础
<?php //1.打开一个目录 $dir = opendir("E:\AppServ\www\php"); //读取目录,使用一个循环来读出 while (!!$file=readdir($dir)) { echo $file."</br>"; }; //关闭目录 closedir($dir); ?>
<?php //打开目录为数组 echo "<pre>"; print_r(scandir("E:\AppServ\www\php")); echo "</pre>"; ?>
标签:style 循环 file read open int code end php基础
原文地址:http://www.cnblogs.com/noper/p/6218862.html