Monday, April 19, 2010

Quickie PHP Directory Listing

$path = ".";

$dir_handle = @opendir($path) or die("Cannot open directory");

while ($file = readdir($dir_handle)) {

if (($file == ".") || ($file == "..") || ($file == "dropdown.php") || ($file == ".svn") || ($file == "old")) {

}else{
echo $file."\n"; }

}

No comments:

Post a Comment