Jump to content
php.lv forumi

Skripts hdd satura nolasisanai


Blitz

Recommended Posts

Meiginaju, bet kaut kaa nesanaak...

Pasakiet kur ir kluuda? Mapee OK ir vel 3 mapes "03, 04, 05"

 

<?php
$dir="C:/OK";
$index=0;
function traverse_dir($dir)
{
 
 $handle=opendir($dir);
while ($file=readdir($handle))
{
       if ($file!=="." and $file!=="..")
       {
        $str1=substr_count($file,".");
           if ($str1==0)
           {
              $masivs[$index]=$file;
              $index++;
           }
       }
 }
 
 print_r($masivs);
 foreach ($masivs as $subdir)
   {
   echo "<b>$subdir</b><br>";
   traverse_dir($subdir);
   }
}

traverse_dir($dir);
?>

 

Array ( []=> 03 [1] => 04 [2] => 05 ) 03

 

Warning: opendir(03) [function.opendir]: failed to open dir: Invalid argument in c:\Inetpub\wwwroot\Foto\bildes.php on line 7

 

Warning: readdir(): supplied argument is not a valid Directory resource in c:\Inetpub\wwwroot\Foto\bildes.php on line 8

Link to comment
Share on other sites

×
×
  • Create New...