PHP FTP Functions
PHP FTP Functions
com LOG IN
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 of 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.
Installation
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.
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_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_nlist() Returns a list of files in the specified directory on the FTP server
FTP_ASCII Integer
FTP_AUTOSEEK Integer
FTP_AUTORESUME Integer
FTP_BINARY Integer
FTP_USEPASVADDRESS Boolean
❮ Previous Next ❯