note 17286 deleted from function.opendir by jimw

From: Date: Sat, 08 Dec 2001 23:42:38 +0000
Subject: note 17286 deleted from function.opendir by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22356@lists.php.net to get a copy of this message
Hello kashmir_us_1999. I correct your mistakes :) <? $cwd = getcwd(); chdir($DOCUMENT_ROOT); $handle1=opendir('.'); while ($file = readdir($handle1)) { if (filetype($file) == "dir") { if ($file != "." && $file != "..") { $dirs[] = $file; }}} closedir($handle1); chdir($cwd); sort($dirs); while (list($b, $dir) = each($dirs)) { echo "<p>$dir</p>"; //abecedni vypis echo "dir=$dir"; $path = "$DOCUMENT_ROOT/$dir"; echo "path=$path "; chdir($path); $handle2=opendir($path); while ($sl = readdir($handle2)) echo $sl; closedir($handle2); chdir($cwd); } ?>

« previous php.notes (#22356) next »