当前位置: 首页 > 图文教程 > 网络编程 > PHP > PHP读取文件夹内有多少个文件
No. « ‹ 215 216 217 218 › »
关键字
<?php
$dir = './pic';
$handle = opendir($dir);
$i = 0;
while(false !== $file=(readdir($handle))){
if($file !== '.' || $file != '..'){
$i ;
}
closedir($handle);
echo $i;
?>
登陆 还没注册?