Ive tryed this code
code:
<?php
$maindir = "." ;
$mydir = opendir($maindir) ;
$exclude = array( "index.php") ;
while($fn = readdir($mydir)) { if ($fn == $exclude[0] || $fn == $exclude[1]) continue;
$file = fopen("file.txt","w");
fwrite($file,"<br><a href='$fn'>$fn</a>"); } closedir($mydir);
fclose($file);
?>
But alls it wrote in the txt was:
code:
<br><a href='indexer.php'>indexer.php</a>