while (($file = readdir($handle))!=false) {
if ($file != "." && $file != "..") {
$n++;
$filesiz = filesize($file);
$modtime = filemtime($file);
$atrib = fileperms($file);
$arr = array("filename"=>array($file),
"filesize"=>array($filesiz), "modif_time"=> array($modtime), "atribut"=>array($atrib));
}
}
while (list ($head) = each ($arr)) {
echo($head. " <br>");
while (list ($key,$val) = each ($arr["$head"])) {
echo($val. " <br>");
}
}
There is somehing wrong but what? Idea is at first make multidim array with filename, filesize, modif time and atrib. After that get date from array. When do this way i get error
"Variable passed to each() is not an array or object in /home/html/scan.php on line 31"
george