java net php_atitit. web 在线文件管理器最佳实践(1)--- elFinder 的使用流程解决之道 。打开浏览服务器文件夹java .net php...

atitit. web 在线文件管理器最佳实践(1)--- elFinder 的使用流程解决之道 。打开浏览服务器文件夹java .net php

1. 环境:::项目java web,需要打开浏览服务器文件夹挑选文件,在返回...

2. 在线文件管理器要实现的基本的功能::指定开始目录,指定getfile回调

3. 组件选型:: elFinder (3M) ,,php web ftp

java的组件基本马,,,php的一瓦....林吧,还是 elFinder  ..pwf好像不那门pro

作者:: 老哇的爪子 Attilax 艾龙,  EMAIL:1466519819@

转载请注明来源: 外链网址已屏蔽

elFinder 是前台后台分离的实现....后台叫conn,返回一个json

3rd party connectors

--------------------

* [Python](外链网址已屏蔽)

* [Django](外链网址已屏蔽)

* [Ruby/Rails](外链网址已屏蔽)

* [Java Servlet](外链网址已屏蔽)

* [ Integration](外链网址已屏蔽)

* [elFinder .Net connector](外链网址已屏蔽)

Support

-------

* [Homepage](外链网址已屏蔽)

* [Wiki](外链网址已屏蔽)

5. elFinder  1.x 的使用过程

下载李java selvlet conn,,,down lei java demo...三,少一瓦lib,,,不个哪都行上,才运行起来...

需要的库...

2008-04-15  20:00           471,040 cmd.exe

2014-10-05  08:23           232,771 commons-codec-1.6.jar

2014-10-05  08:22           143,602 commons-digester-1.8.jar

2014-10-05  07:47            59,590 commons-fileupload-1.2.2.jar

2014-10-05  07:29           173,587 commons-io-2.2.jar

2014-10-05  07:27           315,805 commons-lang3-3.1.jar

2014-10-05  07:25            32,036 elfinder-servlet-1.2.0-SNAPSHOT.jar

2014-10-05  07:42            42,791 java-image-scaling-0.8.5.jar

2014-10-05  07:49           159,123 json-lib-2.4-jdk15.jar

2014-10-05  08:11           350,627 log4j-1.2.11.jar

2014-10-05  08:11           600,236 mchange-commons-java-0.2.6.3.jar

2014-10-05  08:18           119,180 mime-util-2.1.3.jar

2014-10-05  07:51           119,888 org.json.jar

三,走十ui提示g.dir  或者tree.dir 新不上....更改李2.0的ui,三,好像不兼容....

子好使用elFinder 2.0 兰...这个好像马java版本..

6. elFinder 2.0 的使用

子好使用elFinder 2.0 兰...这个好像马java版本..不官子瓦间,down个php

的哈来....

6.1. 指定apache按照端口建立站点

Listen 8888

NameVirtualHost *:8888

# jeig docurrot cant finish by fesyegeor ,,beirs cant root..

DocumentRoot "D:\workspace\vodx\WebRoot"

Options FollowSymLinks

AllowOverride None

Order deny,allow

Allow from all    //打开权限,备儿三403错误...

Satisfy all

6.2. 修改html,,,,修改js路径,配置定义语言

黑头都是google的路径...

$().ready(function() {

var elf = $('#elfinder').elfinder({

url : 'php/connector.php',  // connector URL (REQUIRED)

lang: 'en' ,           // language (OPTIONAL)

getFileCallback : function(file) {

//window.opener.CKEDITOR.tools.callFunction(funcNum, file);

//window.close();

alert( "--"+file);

}

}).elfinder('instance');

});

中间就能跑兰...

6.3. 修改start目录and配置回调

----connector.php

$opts = array(

// 'debug' => true,

'roots' => array(

array(

'driver'        => 'LocalFileSystem',   // driver for accessing file system (REQUIRED)

'path'          => '../../upOa/',         // path to files (REQUIRED)   jeig dir must preMake..beir bao sinbsheod prob

'URL'           => dirname($_SERVER['PHP_SELF']) . '/../../upOa/', // URL to files (REQUIRED)

'accessControl' => 'access'             // disable and hide dot starting files (OPTIONAL)

)

)

);

'path' 也能使用c://xxx/xx2绝对路径了...

'URL'     也能使用http://xxxxx的绝对路径了...

---html

getFileCallback : function(file) {

//window.opener.CKEDITOR.tools.callFunction(funcNum, file);

//window.close();

alert( "--"+file);

}

7. 回调的实现

可以挑选一个文件,在使用工具栏上的图标...也能直接双击 触发...

8. 别的功能

Features

--------

* All operations with files and folders on a remote server (copy, move,

upload, create folder/file, rename, etc.)

* High performance server beckend and light client UI

* Multi-root support

* Local file system, MySQL, FTP volume storage drivers

* Background file upload with Drag & Drop HTML5 support

* List and Icons view

* Kayboard shortcuts

* Standart methods of file/group selection using mouse or keyboard

* Move/Copy files with Drag & Drop

* Archives create/extract (zip, rar, 7z, tar, gzip, bzip2)

* Rich context menu and toolbar

* Quicklook, preview for common file types

* Edit text files and images

* "Places" for your favorites

* Calculate directory sizes

* Thumbnails for image files

* Easy to integrate with web editors (elRTE, CKEditor, TinyMCE)

* Flexible configuration of access rights, upload file types, user interface

and other

* Extensibility

* Simple client-server API based on JSON

9. php的trace

不个try catch包括起来,,三马石麻输出,,大概十不个异常尺兰吧..要不走子能catch自己定义的ex..

10. 参考

Connector configuration options ·Studio-42_elFinder Wiki·GitHub

Integration with CKEditor ·Studio-42_elFinder Wiki·GitHub

PHP debug_backtrace() 函数.htm

php 调试利器debug_print_backtrace()_php技巧_脚本之家

PHP的getTrace

%E5%A4%96%E9%93%BE%E7%BD%91%E5%9D%80%E5%B7%B2%E5%B1%8F%E8%94%BD

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值