" <?php="" $num="0;" $dirname="functio..." />
$num=0;
$dirname=" function';
$dir_handle=opendir($dirnmae);
//循环出所有的文件
echo '<table border=1 align="center" width="1000" cellspacing="0" cellpadding="0">';
echo '<caption><h2>目录'.$dirname.'下面的内容</h2></caption>';
echo '<tr align="left" bgcolor="#CCCCCC">';
echo '<th>文件名</th><th>文件大小</th><th>文件类型</th><th>修改时间</th>';
while($file=readdir($dir_handle)){
$dirfile=$dirname.'/'.$file;
$bgcolor=$num++%2==0 ? '#FFFFFF' : '$CCCCCC';
echo '<tr bgcolor='.$bgcolor.'>';
echo '<td>'.$file.'</td>';
echo '<td>'.filesize($dirfile).'</td>';
echo '<td>'.filetype($dirfile).'</td>';
echo '<td>'.date('Y/n/t',filetime($dirfile)).'</td>';
echo '</tr>';
}
echo '</table>';
closedir($dir_handle);
echo '在<b>'.$dirname.'</b>目录下的子目录和文件共有<b>'.$num.'</b>个';
------解决方案--------------------
没有高亮怎么办 ~
------解决方案--------------------
ide的问题相关解决方案