【发布时间】:2014-10-22 04:22:37
【问题描述】:
所以这段代码做了它应该列出目录中的文件..但它也显示了目录..我想删除它..使用 scandir 错误吗?
<ul>
<?php echo "List of files"?>
<?php
$dir = 'kcfinder/upload/files';
$files = scandir($dir);
foreach($files as $ind_file){
?>
<li><?php echo $ind_file;?> </a> | <a href="includes/delete.php?file=<?=$ind_file?>">Delete</a></li>
<?php
}
?>
</ul>
【问题讨论】: