potresti aggiungere un parametro alla funzione dirExplorer
passato dal chiamante esterno con valore 0Codice PHP:function dirExplorer( $path , $str , $step , $stepLimit , $index)
che viene incrementato ogni volta che trovi un fileCodice PHP:$out = dirExplorer( trim($path) , "" , 0 , 200, 0 );
e viene ripassato alla chiamata ricorsivaCodice 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 ++;
}
Saluti.Codice PHP:$str1 .= "".dirExplorer( $npath , $str1 , ++$step , $stepLimit , $index)."" ;

Rispondi quotando