时间:2021-07-01 10:21:17 帮助过:2人阅读
opendir() 函数实例,代码如下:
<?php
$dir = "./";
// open a known directory, and proceed to read its contents
if (is_dir($dir))
{
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
echo "filename: $file : filetype: " . filetype($dir . $file) . "n"."<br />";
}
closedir($dh);
}
}
?>以上就是php目录遍历opendir()函数的用法的详细内容,更多请关注Gxl网其它相关文章!