You Are Here: Home »   Code Friday September 3rd 2010

Code Library - php

Directory List - (2054 views)


<?

//specify the directory path
$path "../";

//open the directory
$dir = @opendir($path) or die("cannot open $path");

//read and show the result
while (false !== ($files readdir($dir))) {
echo 
"$files<br>";
}

//close the directory
closedir($dir);

?>