elfinder(开源php网盘)

it / 2024-01-29 / 原文

elfinder(开源php网盘)

演示和代码

演示:

https://studio-42.github.io/elFinder/#elf*l1*Lw

代码:

https://github.com/Studio-42/elFinder#downloads

解决方案

  • 不能连接到服务器端. 访问被拒绝. HTTP error 403的解决方案

    更改文件名即可。步骤如下:

    1. 进入php文件夹(如C:\\inetpub\\wwwroot\\elFinder\\php);

    2. connector.minimal.php-disk文件更名为connector.minimal.php

      Untitled

  • 更改页面高度为100%或其他百分比数字

    <aside> 💡 提示: 针对于2.1.65无效,对于2.1.62有效。 放在URL上方将不起作用。

    </aside>

    根目录elfinder.html文件中的约19行的「url: 」下方,增加一行:

    heiaht:'100%',

    Untitled

    https://github.com/Studio-42/elFinder/discussions/3596

    https://github.com/Studio-42/elFinder/wiki/Client-configuration-options-2.1#height

  • 在头部添加文字

    Untitled

  • 拒绝和允许上传的扩展名

    C:\inetpub\wwwroot\elFinder-2.1.62\php

    elFinderVolumeDriver.class.php(397行)

    Untitled

    Untitled

  • 使用Windows10主题

    https://github.com/lokothodida/elfinder-theme-windows-10

  • 上传权限

    https://github.com/Studio-42/elFinder/wiki/Simple-file-permissions-control

    文件:

    https://flowus.cn/preview/0823c1b3-271e-408f-86e9-fcd07433663f

  • 增加卷

    文档:https://github.com/Studio-42/elFinder/issues/98

    要修改的文件:

    C:\inetpub\wwwroot\elFinder-2.1.62\php\connector.minimal.php

    步骤:

    1. 打开C:\\inetpub\\wwwroot\\elFinder-2.1.62\\php\\connector.minimal.php

    2. 复制粘贴以下内容:

      Untitled

    3. 新建相应文件夹。

    代码:

    关键词:LocalFileSystem

            array(
                'driver'        => 'LocalFileSystem',   // driver for accessing file system (REQUIRED)
                'path'          => 'path/to/files/root',         // path to files (REQUIRED)
                'URL'           => '<http://www.localhost.com/files/root/>', // URL to files (REQUIRED)
                'alias'  => 'Root',
                'accessControl' => 'access'             // disable and hide dot starting files (OPTIONAL)
            ),

    效果:

    Untitled

  • 修改关于信息

    Untitled

    C:\inetpub\wwwroot\elFinder-2.1.62\js\i18n

    Untitled

    Untitled

    • 帮助

      \elFinder-2.1.62\js\i18n\help

      en.html.js

      Untitled

  • 无法下载多个文件或文件夹,提示「Cannot open local directory

    可能是服务器文件夹权限的问题。

    Untitled

    设置完成后,虽然可以下载,但下载的格式是tar

  • 权限(下载、上传、锁定、隐藏)

    以下为禁止上传步骤:

    1. 打开C:\\inetpub\\wwwroot\\elFinder-2.1.62\\php
    2. 打开elFinderVolumeDriver.class.php
    3. 查找'defaults' => array(
    4. 将write的值更为false(在452行,false为「假」,代表「禁止」)

    Untitled

    Untitled

    参考:https://github.com/Studio-42/elFinder/issues/98(2013年11月18日)

  • 符号连接

    不确定是否支持符号连接,至少默认是不支持。

    https://github.com/Studio-42/elFinder/blob/66f497515ab2a3e867648cfb410089d1a8d6d53f/css/common.css#L118

  • 压缩文件

    默认下载文件夹或下载多个文件是tar格式,目前未研究好如何下载为zip或rar文件。