在elFinder中打开FTP文件而不提供详细信息



我正在使用elFinder来管理我的FTP文件。但是我想打开FTP文件和文件夹而不提供FTP详细信息。我将elFinder文件保存在同一个FTP上。可能吗?

在连接器.php中:

$opts = array(
// 'debug' => true,
'roots' => array(
    array(
        'driver'        => 'FTP', 
        'path'          => 'here i give path of folder', 
        'accessControl' => 'access'  ,
          'tmpPath' => '../files/ftp',// disable and hide dot starting files (OPTIONAL)
                'defaults' => array('read' => true, 'write' => true),
                'disabled' => array('rename', 'rm' , 'copy' ,'cut','paste')
    )
)
  );

但是当我使用它时。我收到此错误:

后端配置无效。可读卷不可用。

我找到了解决方案。要打开文件,我们不需要在驱动程序中使用ftp选项,只需使用本地文件系统并根据服务器提供文件的路径。

$opts = array(
   // 'debug' => true,
  ' roots' => array(
array(
    'driver'        => 'localFileSystem', 
    'path'          => 'path of the folder that you want to browse', 
    'accessControl' => 'access'  ,
            'defaults' => array('read' => true, 'write' => true),
            'disabled' => array('rename', 'rm' , 'copy' ,'cut','paste')
)
    )
        );

相关内容

最新更新