(PHP 4, PHP 5, PHP 7)
closedir — 锟截憋拷目录锟斤拷锟�
$dir_handle
] ) : void
锟截憋拷锟斤拷 dir_handle
指锟斤拷锟斤拷目录锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷之前锟斤拷
opendir() 锟斤拷锟津开★拷
Example #1 closedir() 锟斤拷锟斤拷
<?php
$dir = "/etc/php5/";
// Open a known directory, read directory into variable and then close
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
$directory = readdir($dh);
closedir($dh);
}
}
?>