Thank you very much for your quick reply.
What i had in mind, was to have this file:
i drop the file in directory and it scans all directories which are there.i was thinking to have this file call it and index.php so once executed it will do the job.
So it could produce directory based navigation .
Thank you,
something like this :
<?php
unset($folder);
if(!empty($HTTP_GET_VARS['folder'])&&!strpos($HTTP_GET_VARS['folder'],'..')&&!strpos($HTTP_GET_VARS['folder'],'\.\.'))
{
$folder=$HTTP_SERVER_VARS['DOCUMENT_ROOT'].'/'.$HTTP_GET_VARS['folder'];
$d=&$HTTP_GET_VARS['folder'];
}
else
{
$folder='.';
$d='.';
}
clearstatcache();
if($a=@opendir($folder))
{
$folder=htmlspecialchars($folder);
$d=htmlspecialchars($d);
while(false!==($b=readdir($a)))
{
if(ereg("^\.",$b))
continue; // ignore hidden files
echo (is_dir($b))?"| <a href=?folder=$d/$b>$b</a>":"| <a href=$d/$b>$b</a>";
}
closedir($a);
}
else
{
echo 'unable to open directory';
}
?>
test|test2|test3
but there is problem with this file it say cant open directory.
and its got this link : index.php?folder=./test
i would like to have it : index.php?folder=test
Thank you.