Easy Tutorial
❮ Php Mysql Connect Php Error Handling ❯

PHP ftp_fput() Function



Definition and Usage

The ftp_fput() function uploads a locally opened file and saves it as a file on the FTP server.

If successful, the function returns TRUE. If it fails, it returns FALSE.

Syntax

Parameter Description
ftp_connection Required. Specifies the FTP connection to use.
remote Required. Specifies the file to save on the FTP server.
local Required. Specifies the opened file to upload.
mode Required. Specifies the transfer mode. Possible values: FTP_ASCII<br> FTP_BINARY
resume Optional. Specifies where in the local file to start copying. Default is 0.

Example

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

The above code will output:

❮ Php Mysql Connect Php Error Handling ❯