[PHP] 文件目录列表程序:H5ai(内置DPlayer)

php文件目录列表程序:H5ai(内置DPlayer)

目前用的比较多的目录列表程序有Directory ListerEvoluted Directory Listing,但论丰富性,H5ai首当其冲。H5ai是一款功能强大的php文件目录列表程序,它提供多种文件目录列表呈现方式,支持Apache httpd, lighttpd, nginx等多种web服务器,支持多国语言(如英语,简体中文等),你可以在线预览txt,图片,音频,视频等文件格式。

  • 下载链接:https://pan.baidu.com/s/132VEx5PIHdhDpHk0D9mHGg
  • 提取码:9vxm

文件结构

/home/wwwroot/xxx.xx
├─ _h5ai
│ ├ private
│ │ └ cache
│ │ └ php
│ │
│ ├ public
│ │ └ cache
│ │ └ css
│ │ └ ext
│ │ └ images
│ │ └ js
│ │ └ .htaccess
│ │ └ index.php
│ │
│ ├ .htaccess
│
├─ 新建目录1
│ ├ 新建子文件.txt
│ └ ······
│
└  新建目录2

使用方法

  • 搭建php网站环境可使用宝塔面板
  • 上传h5ai文件到网站根目录(_h5ai文件夹)。
  • 把h5ai程序_h5ai中private和public两个文件夹中的cache目录权限设置为777
  • 修改配置文件(在配置文件某个地方加上/_h5ai/public/index.php)。

Apache httpd 2.2 / 2.4:httpd.conf
DirectoryIndex index.html index.php /_h5ai/public/index.php

lighttpd 1.4:lighttpd.conf
index-file.names += (“index.html”, “index.php”, “/_h5ai/public/index.php”)

nginx 1.2:nginx.conf
index index.html index.php /_h5ai/public/index.php;

宝塔面板也可以直接在默认文档加上/_h5ai/public/index.php:
在这里插入图片描述

其他:

如果安装 lnmp一键包上传Directory Lister后,Directory Lister不显示文件和目录,那么可能是 PHP函数 scandir 被禁用了,取消禁用即可。

# 修改php.ini解决
disable_functions=passthru,exec,system,chroot,scandir,...
# 删掉scandir,字样,再重启php即可:/etc/init.d/php-fpm restart

将要共享的文件均放到根目录(与_h5ai同一目录下)

服务器文件列表:
在这里插入图片描述
php文件目录列表:

在这里插入图片描述

发布了75 篇原创文章 · 获赞 505 · 访问量 68万+

猜你喜欢

转载自blog.csdn.net/deng_xj/article/details/93796505