1. <?php
  2. // 使用表格浏览目录的结构
  3. print("<TABLE BORDER= '1'>");
  4. // 创建表格的头
  5. print("<TR>");
  6. print("<TH>文件名</TH>");
  7. print("<TH>文件的大小</TH>");
  8. print("</font></TR>");
  9. $myDirectory = opendir("."); // 建立操作目录的句柄
  10. // 读出目录中的每一个子项
  11. while ($entryName = readdir($myDirectory)) {
  12. print("<TR>");
  13. print("<TD>$entryName</TD>");
  14. print("<TD >");
  15. print(filesize($entryName));
  16. print("</TD>");
  17. print("</TR>");
  18. }
  19. closedir($myDirectory); // 关闭目录
  20. print("</TABLE>\n");
  21. ?>

020-PHP浏览目录的更多相关文章

  1. Nginx浏览目录配置及美化

    https://segmentfault.com/a/1190000012606305 在项目中有一个功能需要在浏览器页面中浏览服务器的目录.服务器使用Nginx,而Nginx提供了相应的ngx_ht ...

  2. Blazor组件自做九: 用20行代码实现文件上传,浏览目录功能 (3)

    接上篇 Blazor组件自做九: 用20行代码实现文件上传,浏览目录功能 (2) 7. 使用配置文件指定监听地址 打开 appsettings.json 文件,加入一行 "UseUrls&q ...

  3. python中os.walk浏览目录和文件

    #!/usr/bin/env python # 2.py # use UTF-8 # Python 3.3.0 # os.walk()的使用 import os # 枚举dirPath目录下的所有文件 ...

  4. win10 iis部署后 浏览目录报错 500.19

    错误摘要HTTP 错误 500.19 - Internal Server Error无法访问请求的页面,因为该页的相关配置数据无效.详细错误信息模块 IIS Web Core  通知 BeginReq ...

  5. opencv-python imread、imshow浏览目录下的图片文件

    ☞ ░ 前往老猿Python博文目录 ░ 一.几个知识点 1.1.使用Python查找目录下的文件 具体请参考<Python正则表达式re模块和os模块实现文件搜索模式匹配>. 1.2.o ...

  6. start WampServer如何关闭浏览目录

    打开Httpd.conf IncludesNOEXEC Indexes 去掉这个代码就可以了

  7. 【C#学习笔记】浏览目录得到路径

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  8. nginx浏览目录

    [root@localhost domains]# vi web.jd.com location / proxy_set_header X-Forwarded-For $proxy_add_x_for ...

  9. php简单浏览目录内容

    <?php $dir = dirname(__FILE__); $open_dir = opendir($dir); echo "<table border=1 borderCo ...

随机推荐

  1. SVN团队开发项目工具(安装以及使用)

    https://pan.baidu.com/s/1jJyo9ue  密码:ce9z

  2. 吴裕雄 Bootstrap 前端框架开发——Bootstrap 按钮:表示成功的动作

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  3. 吴裕雄 Bootstrap 前端框架开发——Bootstrap 表单:表单控件状态

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  4. java程序中的经常出现的的异常处理课后总结

    一.JDK中常见的异常情况 1.常见异常总结图 2.java中异常分类 Throwable类有两个直接子类: (1)Exception:出现的问题是可以被捕获的 (2)Error:系统错误,通常由JV ...

  5. 以java实现的一个简单登录界面(带验证码)

    本文参考于:https://blog.csdn.net/wyf2017/article/details/78831744 https://blog.csdn.net/MengKun822/articl ...

  6. Android之Context和Activity互相转换

    1.context转换为activity Activity activity = (Activity) context; 2.从activity得到context 在activity的方法中用cont ...

  7. pug

    https://github.com/pugjs/pug pug模板使用https://www.cnblogs.com/gudi/p/8080736.html

  8. Day3-R-Aggressive cows POJ2456

    Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are locat ...

  9. Random Process Modeling_1

    1. Bertrand Triangle r=1; %circle radius x0=0; y0=0; %centre of circle %points for circle t=linspace ...

  10. 前端学习笔记系列一:15vscode汉化、快速复制行、网页背景图有效设置、 dl~dt~dd标签使用

    ctrl+shift+p,调出configure display language,选择en或zh,若没有则选择安装使用其它语言,则直接呼出扩展程序搜索界面,选择,然后安装,重启即可. shift+a ...