note 40837 deleted from ref.filesystem by felipe

From: Date: Mon, 10 Dec 2007 17:56:40 +0000
Subject: note 40837 deleted from ref.filesystem by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-133225@lists.php.net to get a copy of this message
Note Submitter: ken at xzone9 dot com ---- The following will work on UNIX (from peeweeks code submitted for "Windows")--- function ls ($curpath) { $dir = dir($curpath); echo("<b>$curpath</b>"); echo "<blockquote>"; while ($file = $dir->read()) { if($file != "." && $file != "..") { if (is_dir($curpath.$file)) { ls($curpath.$file."/"); } else { echo("$file<br>"); } } } $dir->close(); echo "</blockquote>"; return; } //Use: $startpath = "/home/mypath/"; ls($startpath);

« previous php.notes (#133225) next »