Someone
public text v1 · immutable<?
//define the path as relative
$path = "/home/httpd/vhosts/mysite.com/";
//using the opendir function
$dir_handle = @opendir($path) or die("Unable to open $path");
echo "Directory Listing of $path<br/>";
//running the while loop
while ($file = readdir($dir_handle))
{
if($file!="." && $file!="..")
echo "<a href='$file'>$file</a><br/>";
}
//closing the directory
closedir($dir_handle);
?>