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

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

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

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

4. elFinder 的概念 1

5. elFinder  1.x 的使用过程 2

6. elFinder 2.0 的使用 3

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

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

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

7. 回调的实现 5

8. 别的功能 5

9. php的trace 6

10. 参考 6

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

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

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

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

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

转载请注明来源: http://blog.csdn.net/attilax

4. elFinder 的概念

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

3rd party connectors

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

* [Python](https://github.com/Studio-42/elfinder-python)

* [Django](https://github.com/mikery/django-elfinder)

* [Ruby/Rails](https://github.com/phallstrom/el_finder)

* [Java Servlet](https://github.com/Studio-42/elfinder-servlet)

* [ASP.NET Integration](http://code.google.com/p/elfinderintegration/)

* [elFinder .Net connector](http://elfinderconnectornet.codeplex.com/)

Support

-------

* [Homepage](http://elfinder.org)

* [Wiki](https://github.com/Studio-42/elFinder/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

<VirtualHost *:8888>

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

DocumentRoot "D:\workspace\vodx\WebRoot"

<Directory />

Options FollowSymLinks

AllowOverride None

Order deny,allow

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

Satisfy all

</Directory>

</VirtualHost>

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

黑头都是google的路径...

<link rel="stylesheet" type="text/css" media="screen" href="css/jquery-ui.css">

<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>

<script type="text/javascript" src="js/jquery-ui-1.8.20.js"></script>

<!-- elFinder translation (OPTIONAL)

<script type="text/javascript" src="js/i18n/elfinder.ru.js"></script>

-->

<!-- elFinder initialization (REQUIRED) -->

<script type="text/javascript" charset="utf-8">

$().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');

});

</script>

中间就能跑兰...

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

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

  1. php小项目-web在线文件管理器

    php小项目-web在线文件管理器 一 项目结果相关视图 二 项目经验 通过简单的实现小项目,对php的文件相关操作更加熟悉,主要用于熟悉文件的相关操作 三 源代码下载地址 http://files. ...

  2. Web 在线文件管理器学习笔记与总结(19)上传文件

    dir.func.php 中添加方法: /* 上传文件 */ function uploadFile($fileInfo,$path,$allowExt = array('jpg','jpeg','p ...

  3. Web 在线文件管理器学习笔记与总结(17)复制文件 (18)剪切文件

    (17)复制文件 ① 复制文件通过copy($src,$dst) 来实现 ② 检测目标目录是否存在,如果存在则继续检测目标目录中是否存在同名文件,如果不存在则复制成功 file.func.php 中添 ...

  4. Web 在线文件管理器学习笔记与总结(15)剪切文件夹 (16)删除文件夹

    (15)剪切文件夹 ① 通过rename($oldname,$newname) 函数实现剪切文件夹的操作 ② 需要检测目标文件夹是否存在,如果存在还要检测目标目录中是否存在同名文件夹,如果不存在则剪切 ...

  5. Web 在线文件管理器学习笔记与总结(13)重命名文件夹(14)复制文件夹

    (13)重命名文件夹 ① 重命名文件夹通过 rename($oldname,$newname) 实现 ② 检测文件夹名是否符合规范 ③ 检测当前目录中是否存在同名文件夹名称,如果不存在则重命名成功 i ...

  6. Web 在线文件管理器学习笔记与总结(11)获取文件夹信息 (12)返回上一级操作

    (11)获取文件夹信息 文件夹没有修改操作. index.php: <?php require 'dir.func.php'; require 'file.func.php'; require ...

  7. Web 在线文件管理器学习笔记与总结(10)查看文件夹中的内容

    ① 读取文件夹大小 a. 封装计算文件夹大小的函数 b.  打开文件夹 c. 循环判断文件夹下的内容是文件还是文件夹,如果是文件,则累积相加文件的大小:如果是文件夹,则递归调用该函数 注意两个问题: ...

  8. Web 在线文件管理器学习笔记与总结(9)下载文件

    ① 普通形式的文件可以使用超链接形式下载 <a href = '下载文件名'>点击下载</a> ② 如果下载图片.html 等类型的文件,使用header() 函数发送网页头信 ...

  9. Web 在线文件管理器学习笔记与总结(8)删除文件

    unlink($filename) 删除文件 index.php: <?php require 'dir.func.php'; require 'file.func.php'; require ...

随机推荐

  1. (四) 一起学 Unix 环境高级编程(APUE) 之 系统数据文件和信息

    . . . . . 目录 (一) 一起学 Unix 环境高级编程 (APUE) 之 标准IO (二) 一起学 Unix 环境高级编程 (APUE) 之 文件 IO (三) 一起学 Unix 环境高级编 ...

  2. Position a child div relative to parent container in CSS: [设置 子DIV位置 跟 父DIV相关联]

    最近调DIV的位置比较头疼,各种position: relative / absolute google到一篇好文章[http://www.webdevdoor.com/html-css/css-po ...

  3. css3之background-clip与background-origin的区别

    background-clip 规定背景的绘制区域. 3 background-origin 规定背景图片的定位区域. 3 background-size 规定背景图片的尺寸. 3 backgroun ...

  4. 内存管理运算符new delete与内存管理函数malloc free的区别——已经他们对对象创建的过程。

    (1)内存管理函数与内存管理运算符的区别 内存管理函数有内存分配函数,malloc calloc realloc 以及内存释放函数free. 内存管理运算符有new 和delete. 两种内存管理方式 ...

  5. jquery checkbox选中、改变状态、change和click事件

    jquery判断checked的三种方法:.attr('checked); //看版本1.6+返回:”checked”或”undefined” ;1.5-返回:true或false.prop('che ...

  6. Jade之属性

    属性 所有的html(5)标签在jade中均支持如下写法.jade中省去了html<>和标签的关闭等写法,并将属性写在括号之中.若存在多个属性,可以将其分为多行. jade: a(href ...

  7. MySQL大小写敏感说明

    Linux环境下,不是windows平台下.区别很大.注意. 一图胜千言   mysql> show create table Ac; +-------+-------------------- ...

  8. 斯坦福第三课:线性代数回顾(Linear Algebra Review)

    3.1  矩阵和向量 3.2  加法和标量乘法 3.3  矩阵向量乘法 3.4  矩阵乘法 3.5  矩阵乘法的性质 3.6  逆.转置 3.1  矩阵和向量 如图:这个是 4×2 矩阵,即 4 行  ...

  9. 基于VC的声音文件操作(一)

    (一)文件格式 1.RIFF文件结构和WAVE文件格式 Windows支持两种RIFF(Resource Interchange File Format,"资源交互文件格式")格式 ...

  10. 第43讲:Scala中类型变量Bounds代码实战及其在Spark中的应用源码解析

    今天学习了scala的界定,先来看看下面这段代码 //class Pair[T] (val first : T,val second : T)class Pair[T <: Comparable ...