note 17286 added to function.opendir

From: Date: Mon, 03 Dec 2001 14:08:07 +0000
Subject: note 17286 added to function.opendir
Groups: php.notes 
Request: Send a blank email to php-notes+get-21559@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); } ?> -- http://www.php.net/manual/en/function.opendir.php http://master.php.net/manage/user-notes.php?action=edit+17286 http://master.php.net/manage/user-notes.php?action=delete+17286 http://master.php.net/manage/user-notes.php?action=reject+17286

« previous php.notes (#21559) next »