Jadual Kandungan
PHP FTP Constants
Rumah php教程 php手册 PHP FTP 函数使用教程

PHP FTP 函数使用教程

Jun 13, 2016 am 10:09 AM
ftp php guna fungsi Fungsi pelanggan bekalan Tutorial dokumen pelayan daripada akses

PHP FTP 函数使用教程

引进的PHP的FTP
该功能提供的FTP客户端访问文件服务器通过文件传输协议( FTP ) 。

该FTP函数是用来打开,登录名和密切的联系,以及上传,下载,重命名,删除和获取信息的文件从文件服务器。并不是所有的FTP功能将与每一个服务器或返回同样的结果。该FTP函数成为可与PHP 3 。

这些功能都是为了详细访问FTP服务器。如果你只希望阅读或写入文件在FTP服务器上,可以考虑使用包装的ftp://与文件的功能。 
 

安装
PHP的Windows版本内置了支持的FTP延长。因此, FTP函数将自动工作。

然而,如果您运行的是Linux版本的PHP中,你将不得不与编译PHP -启用-的F TP( P HP4中+ )或- wi th-的F T P(P H P3中)得到的F T P职能工作。 
 

PHP的FTP函数
PHP的:显示最早的PHP版本,支持的功能。
Function Description PHP
ftp_alloc() Allocates space for a file to be uploaded to the FTP server 5
ftp_cdup() Changes the current directory to the parent directory on the FTP server 3
ftp_chdir() Changes the current directory on the FTP server 3
ftp_chmod() Sets permissions on a file via FTP 5
ftp_close() Closes an FTP connection 4
ftp_connect() Opens an FTP connection 3
ftp_delete() Deletes a file on the FTP server 3
ftp_exec() Executes a program/command on the FTP server 4
ftp_fget() Downloads a file from the FTP server and saves it to an open file 3
ftp_fput() Uploads from an open file and saves it to a file on the FTP server 3
ftp_get_option() Returns runtime behaviors of the FTP connection 4
ftp_get() Downloads a file from the FTP server 3
ftp_login() Logs on to an FTP connection 3
ftp_mdtm() Returns the last modified time of a specified file 3
ftp_mkdir() Creates a new directory on the FTP server 3
ftp_nb_continue() Continues retrieving/sending a file (non-blocking) 4
ftp_nb_fget() Downloads a file from the FTP server and saves it to an open file (non-blocking) 4
ftp_nb_fput() Uploads from an open file and saves it to a file on the FTP server (non-blocking) 4
ftp_nb_get() Downloads a file from the FTP server (non-blocking) 4
ftp_nb_put() Uploads a file to the FTP server (non-blocking) 4
ftp_nlist() Lists the files in a specified directory on the FTP server 3
ftp_pasv() Turns passive mode on or off 3
ftp_put() Uploads a file to the FTP server 3
ftp_pwd() Returns the current directory name 3
ftp_quit() Alias of ftp_close() 3
ftp_raw() Sends a raw command to the FTP server 5
ftp_rawlist() Returns a detailed list of files in the specified directory 3
ftp_rename() Renames a file or directory on the FTP server 3
ftp_rmdir() Removes a directory on the FTP server 3
ftp_set_option() Sets runtime options for the FTP connection 4
ftp_site() Sends a SITE command to the server 3
ftp_size() Returns the size of the specified file 3
ftp_ssl_connect() Opens a secure SSL-FTP connection 4
ftp_systype() Returns the system type identifier of the FTP server 3


PHP FTP Constants

PHP: indicates the earliest version of PHP that supports the constant.

Constant Description PHP
FTP_ASCII   3
FTP_TEXT   3
FTP_BINARY   3
FTP_IMAGE   3
FTP_TIMEOUT_SEC   3
FTP_AUTOSEEK   4
FTP_AUTORESUME Determine resume position and start position for get and put requests automatically 4
FTP_FAILED Asynchronous transfer has failed 4
FTP_FINISHED Asynchronous transfer has finished 4
FTP_MOREDATA Asynchronous transfer is still active 4
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn

Tag artikel panas

Notepad++7.3.1

Notepad++7.3.1

Editor kod yang mudah digunakan dan percuma

SublimeText3 versi Cina

SublimeText3 versi Cina

Versi Cina, sangat mudah digunakan

Hantar Studio 13.0.1

Hantar Studio 13.0.1

Persekitaran pembangunan bersepadu PHP yang berkuasa

Dreamweaver CS6

Dreamweaver CS6

Alat pembangunan web visual

SublimeText3 versi Mac

SublimeText3 versi Mac

Perisian penyuntingan kod peringkat Tuhan (SublimeText3)

Panduan Pemasangan dan Naik Taraf PHP 8.4 untuk Ubuntu dan Debian Panduan Pemasangan dan Naik Taraf PHP 8.4 untuk Ubuntu dan Debian Dec 24, 2024 pm 04:42 PM

Panduan Pemasangan dan Naik Taraf PHP 8.4 untuk Ubuntu dan Debian

Tarikh dan Masa CakePHP Tarikh dan Masa CakePHP Sep 10, 2024 pm 05:27 PM

Tarikh dan Masa CakePHP

Muat naik Fail CakePHP Muat naik Fail CakePHP Sep 10, 2024 pm 05:27 PM

Muat naik Fail CakePHP

Penghalaan CakePHP Penghalaan CakePHP Sep 10, 2024 pm 05:25 PM

Penghalaan CakePHP

Bincangkan CakePHP Bincangkan CakePHP Sep 10, 2024 pm 05:28 PM

Bincangkan CakePHP

Konfigurasi Projek CakePHP Konfigurasi Projek CakePHP Sep 10, 2024 pm 05:25 PM

Konfigurasi Projek CakePHP

Panduan Ringkas CakePHP Panduan Ringkas CakePHP Sep 10, 2024 pm 05:27 PM

Panduan Ringkas CakePHP

Cara Menyediakan Kod Visual Studio (Kod VS) untuk Pembangunan PHP Cara Menyediakan Kod Visual Studio (Kod VS) untuk Pembangunan PHP Dec 20, 2024 am 11:31 AM

Cara Menyediakan Kod Visual Studio (Kod VS) untuk Pembangunan PHP

See all articles