<?
function listdir($path)
{
chdir($path);
$d = dir($path);
$d->path."<br>\n";
print "<ul style='font-size:9pt;'>";
while($entry=$d->read()){
if ($entry<>"." and $entry<>".." ){
$last=filemtime($entry);
print "<li>";
$name=is_dir($entry)?("<img src="/Files/BeyondPic/2005-12/18/05121808204391315.gif">".$entry):("<img src="/Files/BeyondPic/2005-12/18/05121808204695652.gif">".$entry);
print $name." --- ".date("Y/m/d h:i:s",$last);
if (is_dir($path."/".$entry)){
listdir($path."/".$entry);
}
}
}
$d->close();
print "</ul>";
}
$listpath="c:";
echo $listpath;
listdir($listpath);
?>
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/