php简单浏览目录内容的实现代码
时间:2023-10-25 01:32:43
如下所示:
<?php
$dir = dirname(__FILE__);
$open_dir = opendir($dir);
echo "<table border=1 borderColor=red cellpadding=6>";
echo "<tr><th>文件名</th><th>大小</th><th>类型</th><th>修改日期</th></tr>";
while ($file = readdir($open_dir)) {
if ($file!= "." && $file != "..") {
echo "<tr><td>" . $file . "</td>";
echo "<td>" . filesize($file) . "</td>";
echo "<td>" . filetype($file) . "</td>";
echo "<td>" . filemtime($file) . "</td></tr>";
}
}
echo "</table>";
?>
标签:php,浏览目录
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
ASP 统计某字符串中“A”出现过的次数
2010-08-12 10:17:00
Python容器使用的5个技巧和2个误区总结
2023-04-09 04:37:01
初学者快看,Python下划线的五个作用介绍
2023-03-03 18:23:40
![](https://img.aspxhome.com/file/2023/7/68297_0s.jpg)
django重新生成数据库中的某张表方法
2024-01-23 01:14:45
Python实现优先级队列结构的方法详解
2022-06-15 20:59:33
Python实现滑块验证码详解
2022-03-15 09:04:53
![](https://img.aspxhome.com/file/2023/4/77714_0s.jpg)
教你如何用Python实现人脸识别(含源代码)
2021-03-14 23:33:03
![](https://img.aspxhome.com/file/2023/6/104396_0s.jpg)
如何在pyqt中实现全局事件实战记录
2023-07-01 02:25:46
![](https://img.aspxhome.com/file/2023/5/61705_0s.jpg)
SQL语句单引号与双引号的使用方法
2024-01-22 11:35:09
git 优雅的撤销中间某次提交方法
2023-12-27 11:12:50
![](https://img.aspxhome.com/file/2023/5/131965_0s.png)
python使用正则表达式分析网页中的图片并进行替换的方法
2022-04-12 02:32:40
Python Django2 model 查询介绍(条件、范围、模糊查询)
2023-11-02 15:32:09
Python数组拼接np.concatenate实现过程
2023-11-12 04:26:10
![](https://img.aspxhome.com/file/2023/1/76801_0s.png)
对MySQL慢查询日志进行分析的基本教程
2024-01-22 20:32:35
Python爬虫获取页面所有URL链接过程详解
2022-01-31 10:48:46
vue-router权限控制(简单方式)
2024-05-28 15:42:35
PyQt5实现将Matplotlib图像嵌入到Scoll Area中显示滚动条效果
2021-12-21 05:40:39
![](https://img.aspxhome.com/file/2023/8/112118_0s.gif)
mysql中数据库覆盖导入的几种方式总结
2024-01-19 22:26:33
![](https://img.aspxhome.com/file/2023/1/103131_0s.png)
Python实现二维数组按照某行或列排序的方法【numpy lexsort】
2022-03-13 05:06:31
详解python tcp编程
2021-04-30 00:12:46
![](https://img.aspxhome.com/file/2023/1/90941_0s.png)