Hallo,
Und was genau? Den Pfad musst du in den Parameter $directory eingeben; ala
db_get_pages($directory = '../') {
...
}
Das funktioniert nicht.
Wenn ich diesen Weg gehe schlägt der Vergleich
is_dir($file) && (!file_exists($file . '/index.php')
immer fehl
Ich habe es mal so versucht:
function db_get_pages($directory = '/',$pages = array(),$wxp="..") {
if (!isset($wxp)){$wxp="";}
echo $wxp.$directory."<br>";
foreach(glob($wxp.$directory . '*') as $file) {
if($file != $directory . '.' && $file != $directory . '..') {
echo $directory." -- ".$file."<br>";
if(is_dir($file) && (!file_exists($file . '/index.php') &&
!file_exists($file . '/index.htm') &&
!file_exists($file . '/index.html'))) {
$pages = db_get_pages($file . '/',$pages);
}
else if(file_exists($file . '/index.php') ||
file_exists($file . '/index.htm') ||
file_exists($file . '/index.html')) {
$pages[] = $file;
}
}
}
Das Ergebnis ist wohl nicht wie gewünscht. Ausser dem Verzeichnis temp wird nix rekursiv durchsucht.
DirBrowser
Projektübersicht
../
/ -- /1 HTML Hilfe
/ -- /Fuji
/ -- /Grandprix
/ -- /LimboCMS
/ -- /ToendaCMS
/ -- /ahzwei
/ -- /asptest
/ -- /bsv
/ -- /div-tests
/ -- /dream1
/ -- /filemanager
/ -- /fme_new
/ -- /ftmed
/ -- /games
/ -- /guestphp
/ -- /hp
/ -- /index.php
/ -- /minixml-1.3.0
/ -- /myhp
/ -- /pear
/ -- /php-project-browser
/ -- /phptest
/ -- /programmingprojects
/ -- /projekte.php
/ -- /temp
../temp/
/temp/ -- /temp/78143_75_Stück.txt
/temp/ -- /temp/78162_60_Stück.txt
/temp/ -- /temp/78332_30_Stück.txt
/temp/ -- /temp/79413_30_Stück.txt
/temp/ -- /temp/80141_200_Stück.txt
/temp/ -- /temp/80152_250_Stück.txt
/temp/ -- /temp/80491_20_Stück.txt
/temp/ -- /temp/81011_360_Stück.txt
/temp/ -- /temp/81431_40_Stück.txt
/temp/ -- /temp/81491_40_Stück.txt
/temp/ -- /temp/81962_24_Stück.txt
/temp/ -- /temp/82241_230_Stück.txt
/temp/ -- /temp/82261_1500_Stück.txt
/temp/ -- /temp/82722_100_Stück.txt
/temp/ -- /temp/83192_250_Stück.txt
/temp/ -- /temp/83212_15_Stück.txt
/temp/ -- /temp/83411_150_Stück.txt
/temp/ -- /temp/83563_5000_Stück.txt
/temp/ -- /temp/83671_96_Stück.txt
/temp/ -- /temp/83692_7500_Stück.txt
/temp/ -- /temp/84001_500_Stück.txt
/temp/ -- /temp/K004427_98_Stück.txt
/temp/ -- /temp/K004433_100_Stück.txt
/temp/ -- /temp/index.php
Array
(
)
/ -- /w3cxslref
/ -- /wm-tipp
/ -- /xml brinkster
Array
(
)
Hast du eine Vorstellung warum?
bydey
-- bydey ist die Signatur und Verabschiedung, nicht der Nick --
-- Navigate all your PHP web projects with PHP Project Browser--