Easy Tutorial
❮ Func Mysqli Debug Php Mysql Connect ❯

PHP ftp_nb_fget() Function



Definition and Usage

The ftp_nb_fget() function downloads a file from an FTP server and saves it to an already opened local file. (Non-blocking)

This function returns one of the following values:

Unlike ftp_fget(), this function retrieves the file asynchronously. This means your program can perform other operations while the file is being downloaded.

Syntax

Parameter Description
ftp_connection Required. Specifies the FTP connection to use.
local Required. Specifies the local file where the content will be saved.
remote Required. Specifies the path of the file to copy from.
mode Required. Specifies the transfer mode. Possible values: FTP_ASCII<br> FTP_BINARY
resume Optional. Specifies where to start copying in the remote file. Default is 0.

Example

This example copies text from "source.txt" to "target.txt":


❮ Func Mysqli Debug Php Mysql Connect ❯