//define the path as relative
$path = "./";
//using the opendir function
$dir_handle = @opendir($path) or die("Unable to open $path");
echo "Directory Listing of $path
";
//running the while loop
while ($file = readdir($dir_handle))
{
echo "$file
";
}
//closing the directory
closedir($dir_handle);
?>