View Single Post
ישן 03-07-06, 11:49   # 1
drowkid
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Apr 2006
מיקום: מרכז - איזור כפ"ס
הודעות: 138

drowkid לא מחובר  

[php] קריאה מסיפריה

ניתקלתי בבעיה
יש לי תקוד הבא:
PHP קוד:
<?php
$dir 
$_GET["dir"];
if (
$handle opendir($dir)) {
   echo 
"Directory handle: $handle: $dir<Br/>";
   echo 
"Files:<Br/>";

   while (
false !== ($file readdir($handle))) {
if (
$file==".." || $file==".")
{
continue;
}
else

    
$d $dir."/".$file;
    if (@
opendir($d)==true)
    {
    echo 
"$file : folder<Br/>";

///////////////
$c opendir($d);

   while (
false !== ($file readdir($c))) 
{

if (
$file==".." || $file==".")
{
continue;
}
else

    
$d $dir."/".$file;
    if (@
opendir($d)==true)
    {
    echo 
"$file : folder<Br/>";

    echo 
"";
    }
    else
    {
    echo 
"$file : file<Br/>";
    }
}


}
closedir($c);
//////////////
    
echo "<Br/>";
    }
    else
    {
    echo 
"$file : file<Br/><Br/>";
    }
}
   }

   
closedir($handle);
}
?>
הבעיה היא שיכול להיות מלא תקיות בתוך תקיה אחת ואז צריך ליכתוב את הקוד שקורא את התוכן של התקיה מלא פעמים... יש דרך ליפתור את זה?
__________________

Last edited by drowkid; 03-07-06 at 12:05..
  Reply With Quote