Centos安装FastDFS集群文件系统
来源:互联网 发布:海康监控软件 编辑:程序博客网 时间:2024/06/07 20:26
简介
FastDFS是一个开源的轻量级分布式文件系统。它解决了大数据量存储和负载均衡等问题。特别适合以中小文件(建议范围:4KB < file_size <500MB)为载体的在线服务,如相册网站、视频网站等等。在UC基于FastDFS开发向用户提供了:网盘,社区,广告和应用下载等业务的存储服务。
架构
FastDFS服务端有三个角色:跟踪服务器(tracker server)、存储服务器(storage server)和客户端(client)。
- tracker server:跟踪服务器,主要做调度工作,起负载均衡的作用。在内存中记录集群中所有存储组和存储服务器的状态信息,是客户端和数据服务器交互的枢纽。相比GFS中的master更为精简,不记录文件索引信息,占用的内存量很少。Tracker cluster中各个tracker server相互独立,不进行相互通信。
- storage server:存储服务器(又称:存储节点或数据服务器),文件和文件属性(meta data)都保存到存储服务器上。Storage server直接利用OS的文件系统调用管理文件。Storage cluster中各个storage组(Volume1,Volume2…)相互独立,不进行相互通信,也就是说各个组之间保存的数据是不相同的。但是各个组中的storage server之间是属于互相备份的关系,也就是说storage server之间保存相同的数据。每个storage server会启动一个单独的线程主动向Tracker cluster中每个tracker server报告其状态信息,包括磁盘使用情况,文件同步情况及文件上传下载次数统计等信息。
- client:客户端,作为业务请求的发起方,通过专有接口,使用TCP/IP协议与跟踪器服务器或存储节点进行数据交互。
工作流程
- 文件上传
1)Client通过Tracker server将文件上传到Storage server。
2)Tracker server向Client返回一台可用的Storage server的IP地址和端口号。
3)Client直接通过Tracker server返回的IP地址和端口与其中一台Storage server建立连接并进行文件上传。
4)上传完成,Storage server返回给Client上传的文件名和文件组,文件上传结束。 - 文件下载
1)Client通过Tracker server下载指定Storage组中某个Storage server上的某个文件(文件名包括Storage组名称)。
2)Tracker server向Client返回一台可用的Storage server的IP地址和端口号。
3)Client直接通过Tracker server返回的IP地址和端口与其中一台Storage server建立连接并进行文件下载。
安装配置集群
一、系统环境
CentOS 7.3 64位
FastDFS_v5.08.tar.gz
nginx-1.8.1.tar.gz
fastdfs-nginx-module_v1.16.tar.gz
libfastcommon
二、服务器规划
- tracker server:172.18.10.10:22122
- storage server 1:172.18.10.11:23000
- storage server 2:172.18.10.12:23000
- 2台storage server 互为备份,同属一个group。
- 所有服务器按照以下步骤安装,启动时分别启动对应的tracker或storage即可。
- tracker服务器中可以安装使用php或者java驱动,上传文件。
- nginx安装目录:/application/nginx/
- FastDFS配置文件目录:/etc/fdfs/
- FastDFS脚本服务文件目录:/etc/init.d/
- 上传文件存放目录:/data/fastdfs/
- 安装程序存放目录:/home/fdfs/tools/
- 配置ip地址可以填写内网地址
- 外网访问需要开通相应访问端口
三、安装FastDFS
1、创建并进入程序存放目录
[root@fastdfs-storage ~]# mkdir -p /home/fdfs/tools[root@fastdfs-storage ~]# cd /home/fdfs/tools/
2、下载并安装FastDFS依赖包 libfastcommon
[root@fastdfs-storage tools]# wget https://codeload.github.com/happyfish100/libfastcommon/zip/master[root@fastdfs-storage tools]# unzip master[root@fastdfs-storage tools]# cd libfastcommon-master/[root@fastdfs-storage libfastcommon-master]# lsHISTORY INSTALL libfastcommon.spec make.sh php-fastcommon README src[root@fastdfs-storage libfastcommon-master]# ./make.sh[root@fastdfs-storage libfastcommon-master]# ./make.sh install
3、下载并安装FastDFS
[root@fastdfs-tracker tools]# wget https://codeload.github.com/happyfish100/fastdfs/zip/V5.11[root@fastdfs-tracker tools]# unzip V5.11[root@fastdfs-tracker tools]# cd fastdfs-5.11[root@fastdfs-tracker FastDFS]# ./make.sh [root@fastdfs-tracker FastDFS]# ./make.sh install
ps:多tracker情况下,5.10版本以上的FastDFS才支持。
默认方式安装完成之后,文件及目录:
服务脚本:
[root@fastdfs-tracker ~]# ll /etc/init.d/ |grep fdfs-rwxr-xr-x. 1 root root 918 4月 22 22:08 fdfs_storaged-rwxr-xr-x. 1 root root 920 4月 22 22:08 fdfs_trackerd
配置文件
[root@fastdfs-tracker ~]# ll /etc/fdfs/total 20-rw-r--r--. 1 root root 1461 4月 22 22:08 client.conf.sample-rw-r--r--. 1 root root 7927 4月 22 22:08 storage.conf.sample-rw-r--r--. 1 root root 7200 4月 22 22:08 tracker.conf.sample
命令行工具
[root@fastdfs-tracker ~]# ll /usr/bin|grep fdfs-rwxr-xr-x 1 root root 315496 Aug 19 17:07 fdfs_appender_test-rwxr-xr-x 1 root root 315272 Aug 19 17:07 fdfs_appender_test1-rwxr-xr-x 1 root root 302120 Aug 19 17:07 fdfs_append_file-rwxr-xr-x 1 root root 301800 Aug 19 17:07 fdfs_crc32-rwxr-xr-x 1 root root 302184 Aug 19 17:07 fdfs_delete_file-rwxr-xr-x 1 root root 302920 Aug 19 17:07 fdfs_download_file-rwxr-xr-x 1 root root 302504 Aug 19 17:07 fdfs_file_info-rwxr-xr-x 1 root root 316336 Aug 19 17:07 fdfs_monitor-rwxr-xr-x 1 root root 1102216 Aug 19 17:07 fdfs_storaged-rwxr-xr-x 1 root root 325432 Aug 19 17:07 fdfs_test-rwxr-xr-x 1 root root 320552 Aug 19 17:07 fdfs_test1-rwxr-xr-x 1 root root 448032 Aug 19 17:07 fdfs_trackerd-rwxr-xr-x 1 root root 303112 Aug 19 17:07 fdfs_upload_appender-rwxr-xr-x 1 root root 304128 Aug 19 17:07 fdfs_upload_file
注意:虽然FastDFS区分tracker和storage服务器,但是安装的软件及步骤均相同,只是不同的配置文件而已,因此以上安装适用tracker server和storage server。
4、配置tracker server
拷贝tracker server和client端配置文件并重命名
[root@fastdfs-tracker ~]# cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf[root@fastdfs-storage ~]# cp /etc/fdfs/client.conf.sample /etc/fdfs/client.conf
编辑tracker server配置文件tracker.conf,修改内容如下:
disabled=false(默认为false,表示是否无效) port=22122(默认为22122) base_path=/data/fastdfs/tracker
创建tracker server数据目录
[root@fastdfs-tracker ~]# mkdir -p /data/fastdfs/tracker
配置client配置文件client.conf,修改内容如下:
ps:php或java程序驱动通过调用该client配置文件,上传文件
base_path=/data/fastdfs/tracker tracker_server=172.18.10.10:22122
测试启动tracker server,启动成功会自动在/data/fastdfs/tracker目录新建data和logs目录
[root@fastdfs-tracker ~]# cd /data/fastdfs/tracker/[root@fastdfs-tracker tracker]# ls[root@fastdfs-tracker tracker]# /etc/init.d/fdfs_trackerd startStarting FastDFS tracker server:[root@fastdfs-tracker tracker]# ss -lntup|grep 22122tcp LISTEN 0 128 *:22122 *:* users:(("fdfs_trackerd",3785,5)) [root@fastdfs-tracker tracker]# lsdata logs
关闭tracker server命令
[root@fastdfs-tracker tracker]# /etc/init.d/fdfs_trackerd stop
5、配置storage server
拷贝storage server配置文件并重命名
[root@fastdfs-storage ~]# cp /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf
编辑storage server配置文件storage.conf,修改内容如下:
disabled=false(默认为false,表示是否无效) port=23000(默认为23000) base_path=/data/fastdfs/storage tracker_server=172.18.10.10:22122 store_path0=/data/fastdfs/storage http.server_port=8888(默认为8888,nginx中配置的监听端口那之一致)
ps:两台storage server配置相同
创建storage server数据目录
[root@fastdfs-storage ~]# mkdir -p /data/fastdfs/storage
测试启动storage server,启动成功会自动在/data/fastdfs/tracker目录新建data和logs目录,启动storage server时,tracker server已启动
[root@fastdfs-storage ~]# cd /data/fastdfs/storage/[root@fastdfs-storage storage]# ls[root@fastdfs-storage storage]# /etc/init.d/fdfs_storaged startStarting FastDFS storage server:[root@fastdfs-storage storage]# ss -lntup|grep 23000tcp LISTEN 0 128 *:23000 *:* users:(("fdfs_storaged",3786,5))[root@fastdfs-storage storage]# lsdata logs
6、测试文件上传
在tracker server中,执行以下命令,并在/home/fdfs/image/下存在test.jpg图片
[root@fastdfs-tracker ~]# /usr/bin/fdfs_upload_file /etc/fdfs/client.conf /home/fdfs/image/test.jpggroup1/M00/00/00/tBIK6VcaP0aARXasAAHrUgHEviQ394.jpg
返回文件名字,即说明文件上传成功。
7、存储服务器tracker server 安装并配置nginx
下载并安装fastdfs-nginx-module模块
注:FastDFS通过Tracker服务器,将文件放在Storage服务器存储,但是同组存储服务器之间需要进入文件复制,有同步延迟的问题。假设Tracker服务器将文件上传到了172.18.10.11,上传成功后文件ID已经返回给客户端。此时FastDFS存储集群机制会将这个文件同步到同组存储172.18.10.12,在文件还没有复制完成的情况下,客户端如果用这个文件ID在172.18.10.12上取文件,就会出现文件无法访问的错误。而fastdfs-nginx-module可以重定向文件连接到源服务器取文件,避免客户端由于复制延迟导致的文件无法访问错误。
进入/home/fdfs/tools文件夹
[root@fastdfs-tracker ~]# cd /home/fdfs/tools[root@fastdfs-storage tools]# wget http://nchc.dl.sourceforge.net/project/fastdfs/FastDFS%20Nginx%20Module%20Source%20Code/fastdfs-nginx-module_v1.16.tar.gz[root@fastdfs-storage tools]# tar xf fastdfs-nginx-module_v1.16.tar.gz [root@fastdfs-storage tools]# cd fastdfs-nginx-module/src/
修改config文件,执行如下命令,进行批量替换,并保存退出
[root@fastdfs-storage src]# vim config:%s+/usr/local/+/usr/+g
拷贝fastdfs-nginx-module模块中配置文件到/etc/fdfs目录中并编辑
[root@fastdfs-storage ~]# cp /home/fdfs/tools/fastdfs-nginx-module/src/mod_fastdfs.conf /etc/fdfs/[root@fastdfs-storage ~]# vim /etc/fdfs/mod_fastdfs.conf
修改配置文件如下:
connect_timeout=10base_path=/tmp(默认为/tmp)tracker_server=172.18.10.10:22122storage_server_port=23000(默认配置为23000)url_have_group_name = truestore_path0=/data/fastdfs/storagegroup_name=group1(默认配置为group1)
安装nginx依赖库
[root@fastdfs-storage nginx-1.8.1]# yum install -y pcre-devel zlib-devel
下载并安装nginx
[root@fastdfs-storage tools]# wget http://nginx.org/download/nginx-1.8.1.tar.gz[root@fastdfs-storage tools]# tar xf nginx-1.8.1.tar.gz [root@fastdfs-storage tools]# cd nginx-1.8.1[root@fastdfs-storage nginx-1.8.1]# ./configure --prefix=/application/nginx/ --add-module=../fastdfs-nginx-module/src/[root@fastdfs-storage nginx-1.8.1]# make && make install
如果报错缺少gcc,需要先安装gcc
[root@fastdfs-storage nginx-1.8.1]# yum install gcc gcc-c++
拷贝FastDFS中的部分配置文件到/etc/fdfs目录中
[root@fastdfs-storage ~]# cp /home/fdfs/tools/FastDFS/conf/http.conf /etc/fdfs/[root@fastdfs-storage ~]# cp /home/fdfs/tools/FastDFS/conf/mime.types /etc/fdfs/
配置nginx,如下:
[root@fastdfs-storage ~]# vim /application/nginx/conf/nginx.conf user root; worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 8888; server_name www.baidu.com; location ~/group[0-9]/ { ngx_fastdfs_module; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }
主要配置server下的内容,接收请求到对应的文件。
a、"user root"是解决下载操作时报404的问题b、8888端口号与/etc/fdfs/storage.conf中的http.server_port=8888相对应c、storage对应有多个group的情况下,访问路径带group名称,例如:/group1/M00/00/00/**,对应nginx配置: location ~/group[0-9]/ { ngx_fastdfs_module; }
拷贝nginx服务到/etc/init.d/目录下,并启动nginx
[root@fastdfs-storage ~]# cp /application/nginx/sbin/nginx /etc/init.d/[root@fastdfs-storage ~]# /etc/init.d/nginx
配置storage server中的nginx 配置文件中的server部分
server { listen 80; server_name localhost; access_log logs/fdfs.access.log; location ~/group[0-9]/ { ngx_fastdfs_module; } }
通过浏览器可以访问上传的文件
http://www.baidu.com:8888/group1/M00/00/00/tBIK6VcaP0aARXasAAHrUgHEviQ394.jpg
在2台storage server对应目录下可以检查是否有该文件存在
/data/fastdfs/storage/data/00/00/
8、使用php程序在tracker中做上传服务后台
安装php
yum install phpyum install php-devel
安装php-fpm依赖
yum install php-mysql php-mbstring
安装php-fpm
yum install php-fpm
安装FastDFS中php客户端上传支持
cd /home/fastdfs/tools/FastDFS/php_client/phpize./configure --with-php-config=/usr/bin/php-configmakemake installcat /home/fastdfs/tools/FastDFS/php_client/fastdfs_client.ini >> /etc/php.ini
启动php-fpm
systemctl start php-fpm
配置nginx中支持php server
主要配置server内容
server { listen 80; server_name www.google.com; index index.php; root /data/www/fdfsclient; access_log logs/google.log; location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; break; } } location ~ .php($|/) { set $script $uri; set $path_info ""; if ($uri ~ "^(.+.php)(/.+)") { set $script $1; set $path_info $2; } fastcgi_param SCRIPT_FILENAME $document_root$script; fastcgi_param SCRIPT_NAME $script; fastcgi_param PATH_INFO $path_info; try_files $uri =404; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; }}
附上FastDFS官方php操作方法
Copyright (C) 2008 Happy Fish / YuQingFastDFS client php extension may be copied only under the terms of the Less GNU General Public License (LGPL).Please visit the FastDFS Home Page for more detail.Google code (English language): http://code.google.com/p/fastdfs/Chinese language: http://www.csource.com/In file fastdfs_client.ini, item fastdfs_client.tracker_group# point tothe FastDFS client config filename. Please read ../INSTALL file to know about how to config FastDFS client.FastDFS client php extension compiled under PHP 5.2.x, Steps:phpize./configuremakemake install#copy lib file to php extension directory, eg. /usr/lib/php/20060613/cp modules/fastdfs_client.so /usr/lib/php/20060613/#copy fastdfs_client.ini to PHP etc directory, eg. /etc/php/cp fastdfs_client.ini /etc/php/#modify config file fastdfs_client.ini, such as:vi /etc/php/fastdfs_client.ini#run fastdfs_test.phpphp fastdfs_test.phpFastDFS PHP functions:string fastdfs_client_version()return client library versionlong fastdfs_get_last_error_no()return last error nostring fastdfs_get_last_error_info()return last error infostring fastdfs_http_gen_token(string remote_filename, int timestamp)generate anti-steal token for HTTP downloadparameters: remote_filename: the remote filename (do NOT including group name) timestamp: the timestamp (unix timestamp)return token string for success, false for errorarray fastdfs_get_file_info(string group_name, string filename)get file info from the filenameparameters: group_name: the group name of the file remote_filename: the filename on the storage serverreturn assoc array for success, false for error. the assoc array including following elements: create_timestamp: the file create timestamp (unix timestamp) file_size: the file size (bytes) source_ip_addr: the source storage server ip addressarray fastdfs_get_file_info1(string file_id)get file info from the file idparameters: file_id: the file id (including group name and filename) or remote filenamereturn assoc array for success, false for error. the assoc array including following elements: create_timestamp: the file create timestamp (unix timestamp) file_size: the file size (bytes) source_ip_addr: the source storage server ip addressbool fastdfs_send_data(int sock, string buff)parameters: sock: the unix socket description buff: the buff to sendreturn true for success, false for errorstring fastdfs_gen_slave_filename(string master_filename, string prefix_name [, string file_ext_name])generate slave filename by master filename, prefix name and file extension nameparameters: master_filename: the master filename / file id to generate the slave filename prefix_name: the prefix name to generate the slave filename file_ext_name: slave file extension name, can be null or emtpy (do not including dot)return slave filename string for success, false for errorboolean fastdfs_storage_file_exist(string group_name, string remote_filename [, array tracker_server, array storage_server])check file existparameters: group_name: the group name of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for exist, false for not existboolean fastdfs_storage_file_exist1(string file_id [, array tracker_server, array storage_server])parameters: file_id: the file id of the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for exist, false for not existarray fastdfs_storage_upload_by_filename(string local_filename [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload local file to storage serverparameters: local_filename: the local filename file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring fastdfs_storage_upload_by_filename1(string local_filename [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload local file to storage serverparameters: local_filename: the local filename file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for error.array fastdfs_storage_upload_by_filebuff(string file_buff [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file buff to storage serverparameters: file_buff: the file content file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring fastdfs_storage_upload_by_filebuff1(string file_buff [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file buff to storage serverparameters: file_buff: the file content file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for errorarray fastdfs_storage_upload_by_callback(array callback_array [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file to storage server by callbackparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamearray fastdfs_storage_upload_by_callback1(array callback_array [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file to storage server by callbackparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for errorarray fastdfs_storage_upload_appender_by_filename(string local_filename [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload local file to storage server as appender fileparameters: local_filename: the local filename file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring fastdfs_storage_upload_appender_by_filename1(string local_filename [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload local file to storage server as appender fileparameters: local_filename: the local filename file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for error.array fastdfs_storage_upload_appender_by_filebuff(string file_buff [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file buff to storage server as appender fileparameters: file_buff: the file content file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring fastdfs_storage_upload_appender_by_filebuff1(string file_buff [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file buff to storage server as appender fileparameters: file_buff: the file content file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for errorarray fastdfs_storage_upload_appender_by_callback(array callback_array [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file to storage server by callback as appender fileparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring fastdfs_storage_upload_appender_by_callback1(array callback_array [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file to storage server by callback as appender fileparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for errorboolean fastdfs_storage_append_by_filename(string local_filename, string group_name, appender_filename [, array tracker_server, array storage_server])append local file to the appender file of storage serverparameters: local_filename: the local filename group_name: the the group name of appender file appender_filename: the appender filename tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorstring fastdfs_storage_append_by_filename1(string local_filename, string appender_file_id [, array tracker_server, array storage_server])append local file to the appender file of storage serverparameters: local_filename: the local filename appender_file_id: the appender file id tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_append_by_filebuff(string file_buff, string group_name, string appender_filename [, array tracker_server, array storage_server])append file buff to the appender file of storage serverparameters: file_buff: the file content group_name: the the group name of appender file appender_filename: the appender filename tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_append_by_filebuff1(string file_buff, string appender_file_id [, array tracker_server, array storage_server])append file buff to the appender file of storage serverparameters: file_buff: the file content appender_file_id: the appender file id tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_append_by_callback(array callback_array, string group_name, string appender_filename [, array tracker_server, array storage_server])append file to the appender file of storage server by callbackparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function group_name: the the group name of appender file appender_filename: the appender filename tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_append_by_callback1(array callback_array, string appender_file_id [, array tracker_server, array storage_server])append file buff to the appender file of storage serverparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function appender_file_id: the appender file id tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_modify_by_filename(string local_filename, long file_offset, string group_name, appender_filename, [array tracker_server, array storage_server])modify appender file by local fileparameters: local_filename: the local filename file_offset: offset of appender file group_name: the the group name of appender file appender_filename: the appender filename tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_modify_by_filename1(string local_filename, long file_offset, string appender_file_id [, array tracker_server, array storage_server])modify appender file by local fileparameters: local_filename: the local filename file_offset: offset of appender file appender_file_id: the appender file id tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_modify_by_filebuff(string file_buff, long file_offset, string group_name, string appender_filename [, array tracker_server, array storage_server])modify appender file by file buffparameters: file_buff: the file content file_offset: offset of appender file group_name: the the group name of appender file appender_filename: the appender filename tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_modify_by_filebuff1(string file_buff, long file_offset, string appender_file_id [, array tracker_server, array storage_server])modify appender file by file buffparameters: file_buff: the file content file_offset: offset of appender file appender_file_id: the appender file id tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_modify_by_callback(array callback_array, long file_offset, string group_name, string appender_filename [, array tracker_server, array storage_server])modify appender file by callbackparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function file_offset: offset of appender file group_name: the the group name of appender file appender_filename: the appender filename tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_modify_by_callback1(array callback_array, long file_offset, string group_name, string appender_filename [, array tracker_server, array storage_server])modify appender file by callbackparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function file_offset: offset of appender file appender_file_id: the appender file id tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_truncate_file(string group_name, string appender_filename [, long truncated_file_size = 0, array tracker_server, array storage_server])truncate appender file to specify sizeparameters: group_name: the the group name of appender file appender_filename: the appender filename truncated_file_size: truncate the file size to tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_truncate_file1(string appender_file_id [, long truncated_file_size = 0, array tracker_server, array storage_server])truncate appender file to specify sizeparameters: appender_file_id: the appender file id truncated_file_size: truncate the file size to tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorstring/array fastdfs_storage_upload_slave_by_filename(string local_filename, string group_name, string master_filename, string prefix_name [, string file_ext_name, array meta_list, array tracker_server, array storage_server])upload local file to storage server (slave file mode)parameters: file_buff: the file content group_name: the group name of the master file master_filename: the master filename to generate the slave file id prefix_name: the prefix name to generage the slave file id file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring fastdfs_storage_upload_slave_by_filename1(string local_filename, string master_file_id, string prefix_name [, string file_ext_name, array meta_list, array tracker_server, array storage_server])upload local file to storage server (slave file mode)parameters: local_filename: the local filename master_file_id: the master file id to generate the slave file id prefix_name: the prefix name to generage the slave file id file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for error.array fastdfs_storage_upload_slave_by_filebuff(string file_buff, string group_name, string master_filename, string prefix_name [, string file_ext_name, array meta_list, array tracker_server, array storage_server])upload file buff to storage server (slave file mode)parameters: file_buff: the file content group_name: the group name of the master file master_filename: the master filename to generate the slave file id prefix_name: the prefix name to generage the slave file id file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring fastdfs_storage_upload_slave_by_filebuff1(string file_buff, string master_file_id, string prefix_name [, string file_ext_name, array meta_list, array tracker_server, array storage_server])upload file buff to storage server (slave file mode)parameters: file_buff: the file content master_file_id: the master file id to generate the slave file id prefix_name: the prefix name to generage the slave file id file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for errorarray fastdfs_storage_upload_slave_by_callback(array callback_array, string group_name, string master_filename, string prefix_name [, string file_ext_name, array meta_list, array tracker_server, array storage_server])upload file to storage server by callback (slave file mode)parameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function group_name: the group name of the master file master_filename: the master filename to generate the slave file id prefix_name: the prefix name to generage the slave file id file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring fastdfs_storage_upload_slave_by_callback1(array callback_array, string master_file_id, string prefix_name [, string file_ext_name, array meta_list, array tracker_server, array storage_server])upload file to storage server by callback (slave file mode)parameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function master_file_id: the master file id to generate the slave file id prefix_name: the prefix name to generage the slave file id file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for errorboolean fastdfs_storage_delete_file(string group_name, string remote_filename [, array tracker_server, array storage_server])delete file from storage serverparameters: group_name: the group name of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_delete_file1(string file_id [, array tracker_server, array storage_server])delete file from storage serverparameters: file_id: the file id to be deleted tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorstring fastdfs_storage_download_file_to_buff(string group_name, string remote_filename [, long file_offset, long download_bytes, array tracker_server, array storage_server])get file content from storage serverparameters: group_name: the group name of the file remote_filename: the filename on the storage server file_offset: file start offset, default value is 0 download_bytes: 0 (default value) means from the file offset to the file end tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn the file content for success, false for errorstring fastdfs_storage_download_file_to_buff1(string file_id [, long file_offset, long download_bytes, array tracker_server, array storage_server])get file content from storage serverparameters: file_id: the file id of the file file_offset: file start offset, default value is 0 download_bytes: 0 (default value) means from the file offset to the file end tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn the file content for success, false for errorboolean fastdfs_storage_download_file_to_file(string group_name, string remote_filename, string local_filename [, long file_offset, long download_bytes, array tracker_server, array storage_server])download file from storage server to local file parameters: group_name: the group name of the file remote_filename: the filename on the storage server local_filename: the local filename to save the file content file_offset: file start offset, default value is 0 download_bytes: 0 (default value) means from the file offset to the file end tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_download_file_to_file1(string file_id, string local_filename [, long file_offset, long download_bytes, array tracker_server, array storage_server])download file from storage server to local file parameters: file_id: the file id of the file local_filename: the local filename to save the file content file_offset: file start offset, default value is 0 download_bytes: 0 (default value) means from the file offset to the file end tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_download_file_to_callback(string group_name, string remote_filename, array download_callback [, long file_offset, long download_bytes, array tracker_server, array storage_server])parameters: group_name: the group name of the file remote_filename: the filename on the storage server download_callback: the download callback array, elements as: callback - the php callback function name callback function prototype as: function my_download_file_callback($args, $file_size, $data) args - use argument for callback function file_offset: file start offset, default value is 0 download_bytes: 0 (default value) means from the file offset to the file end tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_download_file_to_callback1(string file_id, array download_callback [, long file_offset, long download_bytes, array tracker_server, array storage_server])parameters: file_id: the file id of the file download_callback: the download callback array, elements as: callback - the php callback function name callback function prototype as: function my_download_file_callback($args, $file_size, $data) args - use argument for callback function file_offset: file start offset, default value is 0 download_bytes: 0 (default value) means from the file offset to the file end tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_set_metadata(string group_name, string remote_filename, array meta_list [, string op_type, array tracker_server, array storage_server])set meta data of the fileparameters: group_name: the group name of the file remote_filename: the filename on the storage server meta_list: meta data assoc array to be set, such as array('width'=>1024, 'height'=>768) op_type: operate flag, can be one of following flags: FDFS_STORAGE_SET_METADATA_FLAG_MERGE: combined with the old meta data FDFS_STORAGE_SET_METADATA_FLAG_OVERWRITE: overwrite the old meta data tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_storage_set_metadata1(string file_id, array meta_list [, string op_type, array tracker_server, array storage_server])set meta data of the fileparameters: file_id: the file id of the file meta_list: meta data assoc array to be set, such as array('width'=>1024, 'height'=>768) op_type: operate flag, can be one of following flags: FDFS_STORAGE_SET_METADATA_FLAG_MERGE: combined with the old meta data FDFS_STORAGE_SET_METADATA_FLAG_OVERWRITE: overwrite the old meta data tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorarray fastdfs_storage_get_metadata(string group_name, string remote_filename [, array tracker_server, array storage_server])get meta data of the fileparameters: group_name: the group name of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error returned array like: array('width' => 1024, 'height' => 768)array fastdfs_storage_get_metadata1(string file_id [, array tracker_server, array storage_server])get meta data of the fileparameters: file_id: the file id of the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error returned array like: array('width' => 1024, 'height' => 768)array fastdfs_connect_server(string ip_addr, int port)connect to the serverparameters: ip_addr: the ip address of the server port: the port of the serverreturn assoc array for success, false for errorboolean fastdfs_disconnect_server(array server_info)disconnect from the serverparameters: server_info: the assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean fastdfs_active_test(array server_info)send ACTIVE_TEST cmd to the serverparameters: server_info: the assoc array including elements: ip_addr, port and sock, sock must be connectedreturn true for success, false for errorarray fastdfs_tracker_get_connection()get a connected tracker serverreturn assoc array for success, false for error the assoc array including elements: ip_addr, port and sockboolean fastdfs_tracker_make_all_connections()connect to all tracker serversreturn true for success, false for errorboolean fastdfs_tracker_close_all_connections()close all connections to the tracker serversreturn true for success, false for errorarray fastdfs_tracker_list_groups([string group_name, array tracker_server])get group stat infoparameters: group_name: specify the group name, null or empty string means all groups tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn index array for success, false for error, each group as a array elementarray fastdfs_tracker_query_storage_store([string group_name, array tracker_server])get the storage server info to upload fileparameters: group_name: specify the group name tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the assoc array including elements: ip_addr, port, sock and store_path_indexarray fastdfs_tracker_query_storage_store_list([string group_name, array tracker_server])get the storage server list to upload fileparameters: group_name: specify the group name tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn indexed storage server array for success, false for error. each element is an ssoc array including elements: ip_addr, port, sock and store_path_indexarray fastdfs_tracker_query_storage_update(string group_name, string remote_filename [, array tracker_server])get the storage server info to set metadataparameters: group_name: the group name of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error the assoc array including elements: ip_addr, port and sockarray fastdfs_tracker_query_storage_update1(string file_id, [, array tracker_server])get the storage server info to set metadataparameters: file_id: the file id of the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error the assoc array including elements: ip_addr, port and sockarray fastdfs_tracker_query_storage_fetch(string group_name, string remote_filename [, array tracker_server])get the storage server info to download file (or get metadata)parameters: group_name: the group name of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error the assoc array including elements: ip_addr, port and sockarray fastdfs_tracker_query_storage_fetch1(string file_id [, array tracker_server])get the storage server info to download file (or get metadata)parameters: file_id: the file id of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error the assoc array including elements: ip_addr, port and sockarray fastdfs_tracker_query_storage_list(string group_name, string remote_filename [, array tracker_server])get the storage server list which can retrieve the file content or metadataparameters: group_name: the group name of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn index array for success, false for error. each server as an array elementarray fastdfs_tracker_query_storage_list1(string file_id [, array tracker_server])get the storage server list which can retrieve the file content or metadataparameters: file_id: the file id of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn index array for success, false for error. each server as an array elementboolean fastdfs_tracker_delete_storage(string group_name, string storage_ip)delete the storage server from the clusterparameters: group_name: the group name of the storage server storage_ip: the ip address of the storage server to be deletedreturn true for success, false for errorFastDFS Class Info:class FastDFS([int config_index, boolean bMultiThread]);FastDFS class constructorparams: config_index: use which config file, base 0. default is 0 bMultiThread: if in multi-thread, default is falselong FastDFS::get_last_error_no()return last error nostring FastDFS::get_last_error_info()return last error infobool FastDFS::send_data(int sock, string buff)parameters: sock: the unix socket description buff: the buff to sendreturn true for success, false for errorstring FastDFS::http_gen_token(string remote_filename, int timestamp)generate anti-steal token for HTTP downloadparameters: remote_filename: the remote filename (do NOT including group name) timestamp: the timestamp (unix timestamp)return token string for success, false for errorarray FastDFS::get_file_info(string group_name, string filename)get file info from the filenameparameters: group_name: the group name of the file remote_filename: the filename on the storage serverreturn assoc array for success, false for error. the assoc array including following elements: create_timestamp: the file create timestamp (unix timestamp) file_size: the file size (bytes) source_ip_addr: the source storage server ip address crc32: the crc32 signature of the filearray FastDFS::get_file_info1(string file_id)get file info from the file idparameters: file_id: the file id (including group name and filename) or remote filenamereturn assoc array for success, false for error. the assoc array including following elements: create_timestamp: the file create timestamp (unix timestamp) file_size: the file size (bytes) source_ip_addr: the source storage server ip addressstring FastDFS::gen_slave_filename(string master_filename, string prefix_name [, string file_ext_name])generate slave filename by master filename, prefix name and file extension nameparameters: master_filename: the master filename / file id to generate the slave filename prefix_name: the prefix name to generate the slave filename file_ext_name: slave file extension name, can be null or emtpy (do not including dot)return slave filename string for success, false for errorboolean FastDFS::storage_file_exist(string group_name, string remote_filename [, array tracker_server, array storage_server])check file existparameters: group_name: the group name of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for exist, false for not existboolean FastDFS::storage_file_exist1(string file_id [, array tracker_server, array storage_server])parameters: file_id: the file id of the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for exist, false for not existarray FastDFS::storage_upload_by_filename(string local_filename [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload local file to storage serverparameters: local_filename: the local filename file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring FastDFS::storage_upload_by_filename1(string local_filename [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload local file to storage serverparameters: local_filename: the local filename file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for error.array FastDFS::storage_upload_by_filebuff(string file_buff [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file buff to storage serverparameters: file_buff: the file content file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring FastDFS::storage_upload_by_filebuff1(string file_buff [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file buff to storage serverparameters: file_buff: the file content file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for errorarray FastDFS::storage_upload_by_callback(array callback_array [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file to storage server by callbackparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamearray FastDFS::storage_upload_by_callback1(array callback_array [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file to storage server by callbackparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for errorarray FastDFS::storage_upload_appender_by_filename(string local_filename [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload local file to storage server as appender fileparameters: local_filename: the local filename file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring FastDFS::storage_upload_appender_by_filename1(string local_filename [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload local file to storage server as appender fileparameters: local_filename: the local filename file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for error.array FastDFS::storage_upload_appender_by_filebuff(string file_buff [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file buff to storage server as appender fileparameters: file_buff: the file content file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring FastDFS::storage_upload_appender_by_filebuff1(string file_buff [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file buff to storage server as appender fileparameters: file_buff: the file content file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for errorarray FastDFS::storage_upload_appender_by_callback(array callback_array [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file to storage server by callback as appender fileparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring FastDFS::storage_upload_appender_by_callback1(array callback_array [, string file_ext_name, array meta_list, string group_name, array tracker_server, array storage_server])upload file to storage server by callback as appender fileparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) group_name: specify the group name to store the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for errorboolean FastDFS::storage_append_by_filename(string local_filename, string group_name, appender_filename [, array tracker_server, array storage_server])append local file to the appender file of storage serverparameters: local_filename: the local filename group_name: the the group name of appender file appender_filename: the appender filename tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorstring FastDFS::storage_upload_by_filename1(string local_filename, [string appender_file_id, array tracker_server, array storage_server])append local file to the appender file of storage serverparameters: local_filename: the local filename appender_file_id: the appender file id tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_append_by_filebuff(string file_buff, string group_name, string appender_filename [, array tracker_server, array storage_server])append file buff to the appender file of storage serverparameters: file_buff: the file content group_name: the the group name of appender file appender_filename: the appender filename tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_append_by_filebuff1(string file_buff, string appender_file_id [, array tracker_server, array storage_server])append file buff to the appender file of storage serverparameters: file_buff: the file content appender_file_id: the appender file id tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_append_by_callback(array callback_array, string group_name, string appender_filename [, array tracker_server, array storage_server])append file to the appender file of storage server by callbackparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function group_name: the the group name of appender file appender_filename: the appender filename tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_append_by_callback1(array callback_array, string appender_file_id [, array tracker_server, array storage_server])append file buff to the appender file of storage serverparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function appender_file_id: the appender file id tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_modify_by_filename(string local_filename, long file_offset, string group_name, appender_filename, [array tracker_server, array storage_server])modify appender file by local fileparameters: local_filename: the local filename file_offset: offset of appender file group_name: the the group name of appender file appender_filename: the appender filename tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_modify_by_filename1(string local_filename, long file_offset, string appender_file_id [, array tracker_server, array storage_server])modify appender file by local fileparameters: local_filename: the local filename file_offset: offset of appender file appender_file_id: the appender file id tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_modify_by_filebuff(string file_buff, long file_offset, string group_name, string appender_filename [, array tracker_server, array storage_server])modify appender file by file buffparameters: file_buff: the file content file_offset: offset of appender file group_name: the the group name of appender file appender_filename: the appender filename tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_modify_by_filebuff1(string file_buff, long file_offset, string appender_file_id [, array tracker_server, array storage_server])modify appender file by file buffparameters: file_buff: the file content file_offset: offset of appender file appender_file_id: the appender file id tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_modify_by_callback(array callback_array, long file_offset, string group_name, string appender_filename [, array tracker_server, array storage_server])modify appender file by callbackparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function file_offset: offset of appender file group_name: the the group name of appender file appender_filename: the appender filename tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_modify_by_callback1(array callback_array, long file_offset, string group_name, string appender_filename [, array tracker_server, array storage_server])modify appender file by callbackparameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function file_offset: offset of appender file appender_file_id: the appender file id tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_truncate_file(string group_name, string appender_filename [, long truncated_file_size = 0, array tracker_server, array storage_server])truncate appender file to specify sizeparameters: group_name: the the group name of appender file appender_filename: the appender filename truncated_file_size: truncate the file size to tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_truncate_file1(string appender_file_id [, long truncated_file_size = 0, array tracker_server, array storage_server])truncate appender file to specify sizeparameters: appender_file_id: the appender file id truncated_file_size: truncate the file size to tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorarray FastDFS::storage_upload_slave_by_filename(string local_filename, string group_name, string master_filename, string prefix_name [, string file_ext_name, array meta_list, array tracker_server, array storage_server])upload local file to storage server (slave file mode)parameters: file_buff: the file content group_name: the group name of the master file master_filename: the master filename to generate the slave file id prefix_name: the prefix name to generage the slave file id file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring FastDFS::storage_upload_slave_by_filename1(string local_filename, string master_file_id, string prefix_name [, string file_ext_name, array meta_list, array tracker_server, array storage_server])upload local file to storage server (slave file mode)parameters: local_filename: the local filename master_file_id: the master file id to generate the slave file id prefix_name: the prefix name to generage the slave file id file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for error.array FastDFS::storage_upload_slave_by_filebuff(string file_buff, string group_name, string master_filename, string prefix_name [, file_ext_name, array meta_list, array tracker_server, array storage_server])upload file buff to storage server (slave file mode)parameters: file_buff: the file content group_name: the group name of the master file master_filename: the master filename to generate the slave file id prefix_name: the prefix name to generage the slave file id file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring FastDFS::storage_upload_slave_by_filebuff1(string file_buff, string master_file_id, string prefix_name [, string file_ext_name, array meta_list, array tracker_server, array storage_server])upload file buff to storage server (slave file mode)parameters: file_buff: the file content master_file_id: the master file id to generate the slave file id prefix_name: the prefix name to generage the slave file id file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for errorarray FastDFS::storage_upload_slave_by_callback(array callback_array, string group_name, string master_filename, string prefix_name [, string file_ext_name, array meta_list, array tracker_server, array storage_server])upload file to storage server by callback (slave file mode)parameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function group_name: the group name of the master file master_filename: the master filename to generate the slave file id prefix_name: the prefix name to generage the slave file id file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the returned array includes elements: group_name and filenamestring FastDFS::storage_upload_slave_by_callback1(array callback_array, string master_file_id, string prefix_name [, string file_ext_name, array meta_list, array tracker_server, array storage_server])upload file to storage server by callback (slave file mode)parameters: callback_array: the callback assoc array, must have keys: callback - the php callback function name callback function prototype as: function upload_file_callback($sock, $args) file_size - the file size args - use argument for callback function master_file_id: the master file id to generate the slave file id prefix_name: the prefix name to generage the slave file id file_ext_name: the file extension name, do not include dot(.) meta_list: meta data assoc array, such as array('width'=>1024, 'height'=>768) tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn file_id for success, false for errorboolean FastDFS::storage_delete_file(string group_name, string remote_filename [, array tracker_server, array storage_server])delete file from storage serverparameters: group_name: the group name of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_delete_file1(string file_id [, array tracker_server, array storage_server])delete file from storage serverparameters: file_id: the file id to be deleted tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorstring FastDFS::storage_download_file_to_buff(string group_name, string remote_filename [, long file_offset, long download_bytes, array tracker_server, array storage_server])get file content from storage serverparameters: group_name: the group name of the file remote_filename: the filename on the storage server file_offset: file start offset, default value is 0 download_bytes: 0 (default value) means from the file offset to the file end tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn the file content for success, false for errorstring FastDFS::storage_download_file_to_buff1(string file_id [, long file_offset, long download_bytes, array tracker_server, array storage_server])get file content from storage serverparameters: file_id: the file id of the file file_offset: file start offset, default value is 0 download_bytes: 0 (default value) means from the file offset to the file end tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn the file content for success, false for errorboolean FastDFS::storage_download_file_to_file(string group_name, string remote_filename, string local_filename [, long file_offset, long download_bytes, array tracker_server, array storage_server])download file from storage server to local file parameters: group_name: the group name of the file remote_filename: the filename on the storage server local_filename: the local filename to save the file content file_offset: file start offset, default value is 0 download_bytes: 0 (default value) means from the file offset to the file end tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_download_file_to_file1(string file_id, string local_filename [, long file_offset, long download_bytes, array tracker_server, array storage_server])download file from storage server to local file parameters: file_id: the file id of the file local_filename: the local filename to save the file content file_offset: file start offset, default value is 0 download_bytes: 0 (default value) means from the file offset to the file end tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_download_file_to_callback(string group_name, string remote_filename, array download_callback [, long file_offset, long download_bytes, array tracker_server, array storage_server])parameters: group_name: the group name of the file remote_filename: the filename on the storage server download_callback: the download callback array, elements as: callback - the php callback function name callback function prototype as: function my_download_file_callback($args, $file_size, $data) args - use argument for callback function file_offset: file start offset, default value is 0 download_bytes: 0 (default value) means from the file offset to the file end tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_download_file_to_callback1(string file_id, array download_callback [, long file_offset, long download_bytes, array tracker_server, array storage_server])parameters: file_id: the file id of the file download_callback: the download callback array, elements as: callback - the php callback function name callback function prototype as: function my_download_file_callback($args, $file_size, $data) args - use argument for callback function file_offset: file start offset, default value is 0 download_bytes: 0 (default value) means from the file offset to the file end tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_set_metadata(string group_name, string remote_filename, array meta_list [, string op_type, array tracker_server, array storage_server])set meta data of the fileparameters: group_name: the group name of the file remote_filename: the filename on the storage server meta_list: meta data assoc array to be set, such as array('width'=>1024, 'height'=>768) op_type: operate flag, can be one of following flags: FDFS_STORAGE_SET_METADATA_FLAG_MERGE: combined with the old meta data FDFS_STORAGE_SET_METADATA_FLAG_OVERWRITE: overwrite the old meta data tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorboolean FastDFS::storage_set_metadata1(string file_id, array meta_list [, string op_type, array tracker_server, array storage_server])set meta data of the fileparameters: file_id: the file id of the file meta_list: meta data assoc array to be set, such as array('width'=>1024, 'height'=>768) op_type: operate flag, can be one of following flags: FDFS_STORAGE_SET_METADATA_FLAG_MERGE: combined with the old meta data FDFS_STORAGE_SET_METADATA_FLAG_OVERWRITE: overwrite the old meta data tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn true for success, false for errorarray FastDFS::storage_get_metadata(string group_name, string remote_filename [, array tracker_server, array storage_server])get meta data of the fileparameters: group_name: the group name of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error returned array like: array('width' => 1024, 'height' => 768)array FastDFS::storage_get_metadata1(string file_id [, array tracker_server, array storage_server])get meta data of the fileparameters: file_id: the file id of the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sock storage_server: the storage server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error returned array like: array('width' => 1024, 'height' => 768)array FastDFS::connect_server(string ip_addr, int port)connect to the serverparameters: ip_addr: the ip address of the server port: the port of the serverreturn assoc array for success, false for errorboolean FastDFS::disconnect_server(array server_info)disconnect from the serverparameters: server_info: the assoc array including elements: ip_addr, port and sockreturn true for success, false for errorarray FastDFS::tracker_get_connection()get a connected tracker serverreturn assoc array for success, false for error the assoc array including elements: ip_addr, port and sockboolean FastDFS::active_test(array server_info)send ACTIVE_TEST cmd to the serverparameters: server_info: the assoc array including elements: ip_addr, port and sock, sock must be connectedreturn true for success, false for errorboolean FastDFS::tracker_make_all_connections()connect to all tracker serversreturn true for success, false for errorboolean FastDFS::tracker_close_all_connections()close all connections to the tracker serversreturn true for success, false for errorarray FastDFS::tracker_list_groups([string group_name, array tracker_server])get group stat infoparameters: group_name: specify the group name, null or empty string means all groups tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn index array for success, false for error, each group as a array elementarray FastDFS::tracker_query_storage_store([string group_name, array tracker_server])get the storage server info to upload fileparameters: group_name: specify the group name tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error. the assoc array including elements: ip_addr, port, sock and store_path_indexarray FastDFS::tracker_query_storage_store_list([string group_name, array tracker_server])get the storage server list to upload fileparameters: group_name: specify the group name tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn indexed storage server array for success, false for error. each element is an ssoc array including elements: ip_addr, port, sock and store_path_indexarray FastDFS::tracker_query_storage_update(string group_name, string remote_filename [, array tracker_server])get the storage server info to set metadataparameters: group_name: the group name of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error the assoc array including elements: ip_addr, port and sockarray FastDFS::tracker_query_storage_update1(string file_id, [, array tracker_server])get the storage server info to set metadataparameters: file_id: the file id of the file tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error the assoc array including elements: ip_addr, port and sockarray FastDFS::tracker_query_storage_fetch(string group_name, string remote_filename [, array tracker_server])get the storage server info to download file (or get metadata)parameters: group_name: the group name of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error the assoc array including elements: ip_addr, port and sockarray FastDFS::tracker_query_storage_fetch1(string file_id [, array tracker_server])get the storage server info to download file (or get metadata)parameters: file_id: the file id of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn assoc array for success, false for error the assoc array including elements: ip_addr, port and sockarray FastDFS::tracker_query_storage_list(string group_name, string remote_filename [, array tracker_server])get the storage server list which can retrieve the file content or metadataparameters: group_name: the group name of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn index array for success, false for error. each server as an array elementarray FastDFS::tracker_query_storage_list1(string file_id [, array tracker_server])get the storage server list which can retrieve the file content or metadataparameters: file_id: the file id of the file remote_filename: the filename on the storage server tracker_server: the tracker server assoc array including elements: ip_addr, port and sockreturn index array for success, false for error. each server as an array elementboolean FastDFS::tracker_delete_storage(string group_name, string storage_ip)delete the storage server from the clusterparameters: group_name: the group name of the storage server storage_ip: the ip address of the storage server to be deletedreturn true for success, false for errorvoid FastDFS::close()close tracker connections
- Centos安装FastDFS集群文件系统
- CentOS安装FastDFS集群
- FastDFS分布式文件系统集群安装
- FastDFS分布式文件系统集群安装与配置
- FastDFS分布式文件系统集群安装与配置
- FastDFS分布式文件系统集群安装与配置
- FastDFS分布式文件系统集群安装与配置
- FastDFS分布式文件系统集群安装与配置
- FastDFS分布式文件系统的安装(集群)
- FastDFS分布式文件系统集群安装与配置
- CentOS安装FastDFS单节点分布式文件系统
- CentOS 7 安装配置分布式文件系统 FastDFS
- 64位CentOS安装FastDFS分布式文件系统
- 分布式架构实战--FastDFS分布式文件系统集群安装
- 分布式文件系统 FastDFS 5.0.5 & Linux CentOS 7 安装配置
- 分布式文件系统 FastDFS 5.0.5 & Linux CentOS 7 安装配置
- 分布式文件系统 FastDFS 5.0.8 & Linux CentOS 6.7 安装配置
- 分布式文件系统 FastDFS 5.0.5 & Linux CentOS 7 安装配置
- 金融安全资讯精选 2017年第四期:全球安全支出走高,外国银行再遭黑客袭击
- SparkContext的parallelize的参数
- tp3使用session
- ImagerLoader缓存到SdCard
- Android性能优化(下)
- Centos安装FastDFS集群文件系统
- Javascript字符串单引号与双引号的区别
- python 文件头的编码声明问题
- HDU 1711 Number Sequence (KMP模板)
- JS当中的拷贝!!!
- Oracle学习日志
- 欢迎使用CSDN-markdown编辑器
- D3.js学习笔记十五:D3.js树图(Tree)展开和折叠
- 二进制 与十进制 互相转换