Page 1 of 1

folder tree help!

Posted: Tue Apr 30, 2002 3:38 am
by ina
hi,
i try to find the sample coding to create the dynamic folder tree menu that reading the directory browser (contain files/folders). also available for i.e and netscape 4.x

Posted: Tue Apr 30, 2002 11:25 am
by dusty

Code: Select all

<?
$root = "/www/";
if ($handle = opendir($root)) &#123;
  while($file = readdir($handle)) &#123;
    if ($file != "." && $file != "..") &#123;
      echo "$file<br>";
    &#125;
  &#125;
  closedir($handle);
&#125;
?>
this may be what you're talking about, it displays all of the contents of a given dir. if not, be more specific.

Posted: Wed May 01, 2002 9:55 pm
by ina
i still not have the right answer to solve my problem here.
what i mean is i want to create the function to manage folders/files like windows explorer. but here user can browse the contain of files/folders start from the folder we allow.