I have a folder "archives" full of folders for every month (Jan04,Feb04,...) this script is supposed to add them to an array but it doesn't. DID I DO SOMETHING WRONG?
Looks fine to me. Where are you running the script from? If the script is actually in the
archives
folder, try this...
$dir = "../archives";
...otherwise it's just your path in the
$dir
variable that is giving you fits.
WhosAWhata
11:36 pm on Apr 21, 2004 (gmt 0)
no, i know the path is right o well i'll tamper with it later btw i also tried $dir="archives/"; $d = dir(dir); while($f = $d->read()) { if (is_dir($f) && ($f!= ".") && ($f!= "..")) { echo $f."<br>"; $folders[] = $f; } } $d->close(); that didn't work either
coopster
1:24 pm on Apr 22, 2004 (gmt 0)
If it's not the path, then perhaps it's a permissions issue. I tested it and it runs fine for me, as long as the path is correct.