Sh4d03
public text v1 · immutable <?php
$path = "/home/user/public_html/client/"; // <-- Path to the location of files
$files = scandir($path);
for ($i = 0; $i < sizeof($files); $files += 1)
{
if (is_dir($path . $files[$i]))
{
if ($files[$i]!="." && $files[$i]!="..")
print ("<option>'Client ' . $files[$i].</option>");
}
else
{
print ("<option>'-- ' . $files[$i].</option>");
}
}
/*$dir_handle = @opendir($path) or die("<option>Unable to open $path</option>");
while ($file = readdir($dir_handle))
{
if($file!="." && $file!="..")
print("<option value=$file>$file</option>");
}
closedir($dir_handle);*/
?>