I Need Help Count All Files In Directory

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    I Need Help Count All Files In Directory

    i need help count all files(dir+subdir) in directory please...
    example:

    Melodies [3255]
    Themes [215]


    please help me!!!!

    #2
    From wapbuddy script
    Code:
    <?php
    
    if(!($dp = opendir("./"))) die ("Cannot open ./");
    $file_array = array(); 
    while ($file = readdir ($dp))
    {
    if(substr($file,0,1) != &#39;.&#39; and $file != "index.php" and $file != "search.php")
    {
    $file_array[] = $file;
    }
    }
    $file_count = count ($file_array);
    sort ($file_array);
    echo "Files in this directory: $file_count";
    ?>

    Comment


      #3
      From wapbuddy script
      Code:
      <?php
      
      if(!($dp = opendir("./"))) die ("Cannot open ./");
      $file_array = array(); 
      while ($file = readdir ($dp))
      {
      if(substr($file,0,1) != &#39;.&#39; and $file != "index.php" and $file != "search.php")
      {
      $file_array[] = $file;
      }
      }
      $file_count = count ($file_array);
      sort ($file_array);
      echo "Files in this directory: $file_count";
      ?>
      [/b]
      sory!! this code not count subdirectory

      Comment

      Working...
      X