Mega Code Archive
Working with Directories
resource opendir ( string path )
bool is_dir ( string path )
string readdir ( resource dir_handle )
void closedir ( resource dir_handle )
array scandir ( string directory [, int sorting_order [, resource context]] )
";
}
}
}
} else {
echo "Sorry, this directory does not exist.";
}
}
echo numfilesindir ("sample1");
?>
$handle = opendir('/path/to/directory')
if ($handle) {
while (false != = ($file = readdir($handle))) {
print "$file
\n";
}
closedir($handle);
}
?>