Hab jetzt mein Skript so abgeändert.
PHP-Code:
function ftp_verzeichnisse($ftp_verbindung, $verzeichnis)
{
$ftp_nlist = ftp_nlist($ftp_verbindung, $verzeichnis);
$anzahl = count($ftp_nlist);
$c=0;
for($i=0;$i<$anzahl;$i++){
if (ftp_chdir($ftp_verbindung, $ftp_nlist[$i])) {
$ordner[$c] = $ftp_nlist[$i] ;
$c++;
$ordner[$c][] = ftp_verzeichnisse($ftp_verbindung, $ftp_nlist[$i]);
}
ftp_chdir($ftp_verbindung, '..');
}
return $ordner;
}
aber ich bekomme jetzt zwar ein Array aber ohne Unterordner. So sieht das Array aus:
Code:
Array
(
[0] => anon_ftp
[1] =>
[2] => cgi-bin
[3] =>
[4] => error_docs
[5] =>
[6] => httpdocs
[7] =>
[8] => httpsdocs
[9] =>
[10] => private
[11] =>
[12] => subdomains
[13] =>
[14] => web_users
[15] =>
)
Überall wo jetzt keine Werte drin stehen müssten eigentlich die Unterordner sein.
Was muss ich noch verändern?
mfg.