You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
402 B

<?php
$dir = "./dir1/";
//创建目录
mkdir($dir);
//打开目录
$dirinfo = opendir($dir);
echo $dirinfo;
//读取目录
while($file=readdir($dirinfo) !== false){
echo $file.'<br>';
}
//读取目录
$arr = scandir($dir);
echo "<pre>";
print_r($arr);
//关闭目录
closedir($dirinfo);
//删除空目录
rmdir($dir);
?>