h5ai 一个网页目录文件索引
有时我们常需要一个在线的目录索引来引导下载文件的路径
然而直接提供FTP帐户似乎不太现实。一来这个延迟太高,二来帐户权限什么的设置也太过于繁琐。
这时我们就可以利用PHP脚本来建一个索引~
安装
1、在官网页面https://larsjung.de/h5ai/中点击Download获取源代码,然后上传到共享文件夹的根目录
2、访问http://你的域名/_h5ai/public/index.php检查空间是否达到要求。默认密码为空
3、设置默认目录脚本
For Apache (in httpd.conf or in the root directory's .htaccess)
DirectoryIndex index.html index.php /_h5ai/public/index.php
For Nginx (in nginx.conf)
index index.html index.php /_h5ai/public/index.php;
For lighttpd (in lighttpd.conf)
index-file.names += ("index.html", "index.php", "/_h5ai/public/index.php")
For Cherokee (in cherokee.conf)
vserver!1!directory_index = index.html,index.php,/_h5ai/public/index.php
4、打开主域名即可使用!
5、上传文件到空间,注意与目录_h5ai平行
我的站点DEMO
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。
小菜鸡
评论已关闭