PHP ftp_set_option() Function

PHP FTP Reference : Set timeout for network operations

Definition and Usage

The ftp_set_option() function sets runtime options of the current FTP connection.

Syntax

ftp_set_option(ftp_conn, option, value);

Parameter Values

Parameter Description
ftp_conn Required. Specifies the FTP connection to use
option Required. Specifies the runtime option to set. Possible values:
  • FTP_TIMEOUT_SEC
  • FTP_AUTOSEEK
  • FTP_USEPASVADDRESS
value Required. Specifies the value of the option parameter

Technical Details

Return Value: TRUE if the option could be set, FALSE if not (a warning message is also thrown)
PHP Version: 4.2+

❮ PHP FTP Reference