$basedir = "../nexflo/";
$backone ="../nexflo/";
chdir($basedir);
$count = 0;
$i = 0;
$dir = dir("");
while ($file = $dir->read())
{
if (is_file($file))
{
$count = ($count + filesize($file));
}
if (is_dir($file))
{
$dirlist[] = $file;
}}
if (count($dirlist) > 0) {
while (list ($key, $val) = each ($dirlist)) {
echo "$dirlist[$i]";
chdir($val);
$i++;
}
}
Ok, as you see above that will print out all sub dirs..
When i go to change dirs with this code below
chdir($val);
$dir = dir(".");
while ($file = $dir->read())
{
if (is_file($file))
{
chdir($val);
$dir = dir(".");
while ($file = $dir->read()) {
if (is_file($file)) {
$count = ($count + filesize($file));
}
if (is_dir($file)) {
$subdirlist[] = $file;
}
chdir($backone);
}
}
I jump to the . and the .. dir
I get major errors from this, can anybody help
Thanks
Chris