ftp_put

(PHP 3>= 3.0.13, PHP 4 )

ftp_put -- Uploads a file to the FTP server

Description

bool ftp_put ( resource ftp_stream, string remote_file, string local_file, int mode [, int startpos])

ftp_put() stores local_file on the FTP server, as remote_file. The transfer mode specified must be either FTP_ASCII or FTP_BINARY.

Замечание: The startpos parameter was added in PHP 4.3.0.

Возвращает TRUE в случае успешного завершения, FALSE в случае возникновения ошибки.

Пример 1. ftp_put() example

$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_ASCII);