说明:今天博主去国外一些博客看了下,偶然间发现个好东西,是一个大家都很少知道的目录索引程序,Evoluted Directory Listing Script,与之前说的H5ai、Directory Lister不同的是,该程序支持各种操作,比如删除/上传/创建文件夹等等。可以当私人网盘使用,而且程序就一个index.php文件,很简洁。
功能
全面的支持移动浏览器。
能够上传多个文件并限制允许的文件类型。
支持通过密码或IP地址白名单来限制对脚本的访问(理想的情况是只需要您自己和客户端的访问权限!)。
支持创建新的目录和子目录。
上传压缩文件并自动提取压缩文件,并提供压缩文件解压后的选项。
可选地隐藏某些文件类型,名称或扩展名以及目录。
按名称,大小或上次修改日期排序文件列表。
安装
系统要求:PHP 5.3或更高版本、安装fileinfo拓展。如果你想启用解压缩支持,你还需要安装ZipArchive php扩展。
想方便的,直接安装宝塔面板,教程:宝塔面板安装教程,然后进入后台再安装PHP和Nginx环境,再找到左侧软件管理-PHP管理-设置-安装Fileinfo拓展。
#如果Fileinfo拓展安装失败,就是内存太小,我们可以添加swap,不适用于ovz vps.
在宝塔面板添加,找到左侧软件管理-系统工具-安装Linux工具箱,然后进入工具箱添加。
之后添加域名,上传文件即可。Evoluted下载:
https://www.evoluted.net/assets/thinktank/wp-content/uploads/2016/08/evoluted-directory-listing-script-4.0.5.zip
关于功能设置,直接在index.php文件里修改即可,这里列举几个功能。
#上传压缩文件并自动提取压缩文件
// 设置为true,解压缩,上传任何ZIP文件(注意:会覆盖同名的!文件)
public $enableUnzipping = true;
// 如果您已经启用解压,您可以选择上传后设置为TRUE,删除原来的压缩文件。
public $deleteZipAfterUploading = false;
#网盘增加密码访问
// 设置为true,以便在使用脚本之前输入密码。
public $passwordProtect = true;
// 需要使用这个脚本的密码(如果只使用$passwordprotect设置为true)
public $password = '填写密码';
#允许访问的IP地址
// 可选。允许限制只能访问白名单的IP地址
public $enableIpWhitelist = true;
//允许脚本IP列表(如果只使用$enableIpWhitelist是true)
public $ipWhitelist = array(
'填写ip'
'填写ip'
);
#隐藏文件以及扩展名文件
// 从目录列表中显示的块扩展文件扩展名
public $ignoredFileExtensions = array(
'扩展名',
'扩展名',
);
// 从目录列表中显示的块文件名
public $ignoredFileNames = array(
'需要隐藏的文件',
'需要隐藏的文件',
'需要隐藏的文件',
);
// 以点开头的文件通常是隐藏文件。设置为false如果你想显示这些隐藏文件。
public $ignoreDotFiles = true;
#隐藏的目录
// 在目录列表中显示的要阻止的目录
public $ignoredDirectories = array(
'需要隐藏的目录',
);
--------------------------
功能
全面的支持移动浏览器。
能够上传多个文件并限制允许的文件类型。
支持通过密码或IP地址白名单来限制对脚本的访问(理想的情况是只需要您自己和客户端的访问权限!)。
支持创建新的目录和子目录。
上传压缩文件并自动提取压缩文件,并提供压缩文件解压后的选项。
可选地隐藏某些文件类型,名称或扩展名以及目录。
按名称,大小或上次修改日期排序文件列表。
安装
系统要求:PHP 5.3或更高版本、安装fileinfo拓展。如果你想启用解压缩支持,你还需要安装ZipArchive php扩展。
想方便的,直接安装宝塔面板,教程:宝塔面板安装教程,然后进入后台再安装PHP和Nginx环境,再找到左侧软件管理-PHP管理-设置-安装Fileinfo拓展。
#如果Fileinfo拓展安装失败,就是内存太小,我们可以添加swap,不适用于ovz vps.
在宝塔面板添加,找到左侧软件管理-系统工具-安装Linux工具箱,然后进入工具箱添加。
之后添加域名,上传文件即可。Evoluted下载:
https://www.evoluted.net/assets/thinktank/wp-content/uploads/2016/08/evoluted-directory-listing-script-4.0.5.zip
关于功能设置,直接在index.php文件里修改即可,这里列举几个功能。
#上传压缩文件并自动提取压缩文件
// 设置为true,解压缩,上传任何ZIP文件(注意:会覆盖同名的!文件)
public $enableUnzipping = true;
// 如果您已经启用解压,您可以选择上传后设置为TRUE,删除原来的压缩文件。
public $deleteZipAfterUploading = false;
#网盘增加密码访问
// 设置为true,以便在使用脚本之前输入密码。
public $passwordProtect = true;
// 需要使用这个脚本的密码(如果只使用$passwordprotect设置为true)
public $password = '填写密码';
#允许访问的IP地址
// 可选。允许限制只能访问白名单的IP地址
public $enableIpWhitelist = true;
//允许脚本IP列表(如果只使用$enableIpWhitelist是true)
public $ipWhitelist = array(
'填写ip'
'填写ip'
);
#隐藏文件以及扩展名文件
// 从目录列表中显示的块扩展文件扩展名
public $ignoredFileExtensions = array(
'扩展名',
'扩展名',
);
// 从目录列表中显示的块文件名
public $ignoredFileNames = array(
'需要隐藏的文件',
'需要隐藏的文件',
'需要隐藏的文件',
);
// 以点开头的文件通常是隐藏文件。设置为false如果你想显示这些隐藏文件。
public $ignoreDotFiles = true;
#隐藏的目录
// 在目录列表中显示的要阻止的目录
public $ignoredDirectories = array(
'需要隐藏的目录',
);
--------------------------
Directory Listing Script
Back in 2008 we created
the original version of our popular directory listing script. Since
then we’ve released three new versions, addressing a number of known
issues. In 2015 we completely rebuilt the script from scratch,
introducing some handy new features and improvements.
The PHP Directory Listing Script is a highly configurable script, allowing you to simply upload one file into a web-accessible directory, and it’ll be turned into a well formatted, mobile friendly directory browser.
With the release of version 4, we’ve got some great new features, including:
All of the new features can be enabled and disabled individually, so whether you’re looking for a full file manager, or a simple list of downloads, the PHP Directory Listing script has you covered.
from https://www.evoluted.net/thinktank/web-development/php-directory-listing-script
The PHP Directory Listing Script is a highly configurable script, allowing you to simply upload one file into a web-accessible directory, and it’ll be turned into a well formatted, mobile friendly directory browser.
With the release of version 4, we’ve got some great new features, including:
- Full mobile browser support.
- The ability to upload multiple files and restrict the allowed file-types.
- Support for restricting access to the script by either password or IP Address whitelisting (ideal if you want only yourself and clients to have access!).
- Support for creating new directories and sub-directories.
- Upload zip files and extract them automatically, with the option to delete the zip file after it’s been extracted.
- Optionally hide certain file types, names or extensions, as well as directories.
- Sort file listings by name, size or last modified date.
All of the new features can be enabled and disabled individually, so whether you’re looking for a full file manager, or a simple list of downloads, the PHP Directory Listing script has you covered.
System Requirements
To run the PHP Directory Listing Script on your website, you’ll need to be running PHP 5.3 or above and have the GD2 library installed. If you wish to enable the unzip support, you’ll also need the ZipArchive php extension installed.Download
To download the script please click here. The ZIP file contains all you need to run the script. To setup the script please see the top of index.php.Installation
To install the PHP Directory Listing Script, simply extract the zip file and open up the index.php file. Inside you’ll see a number of options that you can alter. Once you’ve set your options, simply upload the file into your directory and then browse to it from the web. You should now be up and running!Future
We’re always open to feedback for improvements and suggestions so please leave any ideas in the comments section below and we’ll do our best to incorporate them into a future update.from https://www.evoluted.net/thinktank/web-development/php-directory-listing-script
No comments:
Post a Comment