potresti aggiungere un parametro alla funzione dirExplorer

Codice PHP:
function dirExplorer$path $str $step $stepLimit $index
passato dal chiamante esterno con valore 0

Codice PHP:
$out =  dirExplorertrim($path) , "" 200); 
che viene incrementato ogni volta che trovi un file
Codice PHP:
if( !is_dir($path) )

   return 
"[*]<a href=\"".$path."\" onclick=\"window.open(this.href);return false;\">".strtoupper($d)."</a> - 
   <a id='delFile" 
$index "' href=\"java-script:void(0)\" title='".$d."'>rimuovi</a>\n" 

   
$index ++;           

e viene ripassato alla chiamata ricorsiva

Codice PHP:
$str1 .= "".dirExplorer$npath $str1 , ++$step $stepLimit $index)."" 
Saluti.