时间:2021-07-01 10:21:17 帮助过:8人阅读
输出结果:
$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"."
";
}
closedir($dh);
}
}
?>
http://www.bkjia.com/PHPjc/322757.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/322757.htmlTechArticle 代码如下:?php $dir = "./"; // Open a known directory, and proceed to read its contents if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)...