I want to open a directory in php and then display the link for downloading that file.
this is what I am trying.
if(is_dir($dir))
{
$op=opendir($dir);
echo"Files in the directiry are<br>";
while(($file=readdir($op))!==false)
{
if(strpos($file,$ext,1))
{
echo "<a href=apps/".$file .">".$file."</a><br>";
}
}
}
this shows downloading links but only upto space.