Egyébként a kilistázós része egy kis htmlel együtt:
Kód:
<?php
function get_directory_file($path)
{
$path_id = opendir($path);
while($file_name = readdir($path_id))
{
if($file_name != "." and$file_name != "..")
{
$file["type"] = filetype($path . "/". $file_name);
if($file["type"] == "dir")
{
$file_array = get_directory_file($path . "/"
. $file_name);
if(isset($found))
{
$found = array_merge($found,$file_array);
}
else
{
$found = $file_array;
}
}
else
{
$file["accessed"] = fileatime($path. "/" . $file_name);
$file["changed"] = filectime($path. "/" . $file_name);
$file["group"] = filegroup($path ."/" . $file_name);
$file["inode"] = fileinode($path ."/" . $file_name);
$file["modified"] = filemtime($path . "/" .$file_name);
$file["owner"] = fileowner($path ."/" . $file_name);
$file["permissions"] = fileperms($path . "/" .$file_name);
$file["size"] = filesize($path . "/" .$file_name);
$found[$path][$file_name] = $file;
}
}
}
closedir($path_id);
if(!isset($found))
{
$found = array();
}
return($found);
}
?>
<!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
</head>
<body>
<?php
$found = get_directory_file($path);
reset($found);
print("<table border=\\\\\\\"3\\\\\\\\"><tr>< td><em>Mappa</em></td>"
. "<td><em>Név</em></td>< td><em>Típus</em></td></tr>");
while(list($d, $dv) = each($found))
{
if(is_array($dv))
{
while(list($f, $fv) = each($dv))
{
print("<tr><td>" . $d . "</td><td>" . $f . "</td>"
. "<td>" . $fv . "</td></tr>");
}
}
else
{
print("<tr><td>" . $d . "</td><td>" . $dv . "</td>"
. "<td> </td></tr>");
}
}
print("</table>");
?>
</body>
</html>
Persze ebbôl egy rakat oszlop neked nemkell, mint pl h utcsóra módosított stb...
Segítség: $path a mappaneve.(ne írd át h $asd, hanem deklaráld: $path = asd)