Thanx But.........
Now I'm gettin this error message
Warning: Invalid argument supplied for foreach() in D:\Inetpub\wwwroot\readdir.php on line 16
that is the actual path name to the file.
Here is the bit of code for readdir.php
<?php
$dh = opendir("D:\Inetpub\wwwroot\documents_basic");
$filename = $_POST["directory"];
while (!(($file = readdir($dh))===false)){
if(stristr($file, $filename)){
if(strstr($file, ".")){
print"$file<br>";
foreach($file as $f){
echo'<br><a href="'.$f.'">'.$f.'</a>';
}
}
}
}
closedir($dh);
?>