最适合网络开发者的网站

PHP 教程

PHP 主页 PHP 简介 PHP 安装 PHP 语法 PHP 注释 PHP 变量 PHP 回显/打印 PHP 数据类型 PHP 字符串 PHP 数字 PHP 数学 PHP 常量 PHP 运算符 PHP 如果...否则...Elseif PHP 开关 PHP 循环 PHP 函数 PHP 数组 PHP 超全局变量 PHP 正则表达式

PHP 形式

PHP 表单处理 PHP 表单验证 需要 PHP 表单 PHP 表单 URL/电子邮件 PHP 表单完成

PHP 先进的

PHP 日期和时间 PHP 包含 PHP 文件处理 PHP 文件打开/读取 PHP 文件创建/写入 PHP文件上传 PHP 饼干 PHP 会话 PHP 过滤器 PHP 过滤器高级 PHP 回调函数 PHP 的 JSON PHP 异常

PHP 面向对象

PHP 什么是OOP PHP 类/对象 PHP 构造函数 PHP 析构函数 PHP 访问修饰符 PHP 继承 PHP 常量 PHP 抽象类 PHP 接口 PHP 特征 PHP 静态方法 PHP 静态属性 PHP 命名空间 PHP 可迭代对象

MySQL 数据库

MySQL 数据库 MySQL 连接 MySQL 创建数据库 MySQL 创建表 MySQL 插入数据 MySQL 获取最后一个 ID MySQL 插入多个 MySQL 已准备 MySQL 选择数据 MySQL 哪里 MySQL 排序依据 MySQL 删除数据 MySQL 更新数据 MySQL 限制数据

PHP XML

PHP XML 解析器 PHP SimpleXML 解析器 PHP SimpleXML - 获取 PHP XML 扩展 PHP XML DOM

PHP - 阿贾克斯

AJAX 简介 AJAX PHP AJAX 数据库 AJAX XML AJAX实时搜索 AJAX 民意调查

PHP 例子

PHP 示例 PHP 编译器 PHP 测验 PHP 练习 PHP 证书

PHP 参考

PHP 概述 PHP 数组 PHP 日历 PHP 日期 PHP 目录 PHP 错误 PHP 异常 PHP 文件系统 PHP 过滤器 PHP FTP PHP 的 JSON PHP 关键字 PHP 库 PHP 邮件 PHP 数学 PHP 杂项 PHP MySQLi PHP 网络 PHP 输出控件 PHP 正则表达式 PHP 简单 XML PHP 流 PHP 字符串 PHP 变量处理 PHP XML解析器 PHP 压缩文件 PHP 时区

PHP。初学者课程

尿素

PHP FTP 功能


PHP FTP Introduction

The FTP functions give client access to file servers through the File Transfer Protocol (FTP).

The FTP functions are used to open, login and close connections, as well as upload, download, rename, delete, and get information on files from file servers. Not all the FTP functions will work with every server or return the same results. The FTP functions became available with PHP 3.

If you only wish to read from or write to a file on an FTP server, consider using the ftp:// wrapper with the Filesystem functions which provide a simpler and more intuitive interface.


安装

For these functions to work, you have to compile PHP with --enable-ftp.

The Windows version of PHP has built-in support for this extension.


PHP FTP Functions

功能 描述
ftp_alloc() Allocates space for a file to be uploaded to the FTP server
ftp_cdup() Changes to the parent directory on the FTP server
ftp_chdir() Changes the current directory on the FTP server
ftp_chmod() Sets permissions on a file via FTP
ftp_close() Closes an FTP connection
ftp_connect() Opens an FTP connection
ftp_delete() Deletes a file on the FTP server
ftp_exec() Executes a command on the FTP server
ftp_fget() Downloads a file from the FTP server and saves it into an open local file
ftp_fput() Uploads from an open file and saves it to a file on the FTP server
ftp_get() Downloads a file from the FTP server
ftp_get_option() Returns runtime options of the FTP connection
ftp_login() Logs in to the FTP connection
ftp_mdtm() Returns the last modified time of a specified file
ftp_mkdir() Creates a new directory on the FTP server
ftp_mlsd() Returns the list of files in the specified directory
ftp_nb_continue() Continues retrieving/sending a file (non-blocking)
ftp_nb_fget() Downloads a file from the FTP server and saves it into an open file (non-blocking)
ftp_nb_fput() Uploads from an open file and saves it to a file on the FTP server (non-blocking)
ftp_nb_get() Downloads a file from the FTP server (non-blocking)
ftp_nb_put() Uploads a file to the FTP server (non-blocking)
ftp_nlist() Returns a list of files in the specified directory on the FTP server
ftp_pasv() Turns passive mode on or off
ftp_put() Uploads a file to the FTP server
ftp_pwd() Returns the current directory name
ftp_quit() 别名 ftp_close()
ftp_raw() Sends a raw command to the FTP server
ftp_rawlist() Returns a list of files with file information from a specified directory
ftp_rename() Renames a file or directory on the FTP server
ftp_rmdir() Deletes an empty directory on the FTP server
ftp_set_option() Sets runtime options for the FTP connection
ftp_site() Sends an FTP SITE command to the FTP server
ftp_size() Returns the size of the specified file
ftp_ssl_connect() Opens a secure SSL-FTP connection
ftp_systype() Returns the system type identifier of the FTP server

PHP Predefined FTP Constants

Constant Type 描述
FTP_ASCII Integer  
FTP_AUTOSEEK Integer  
FTP_AUTORESUME Integer  
FTP_BINARY Integer  
FTP_FAILED Integer Asynchronous transfer has failed
FTP_FINISHED Integer Asynchronous transfer is completed
FTP_IMAGE Integer Alias of FTP_BINARY
FTP_MOREDATA Integer Asynchronous transfer is in progress
FTP_TEXT Integer Alias of FTP_ASCII
FTP_TIMEOUT_SEC Integer The timeout used for network operations
FTP_USEPASVADDRESS Boolean