PHP ftp_set_option()Functions
Complete PHP FTP Reference Manual
Definition and Usage
The ftp_set_option() function sets various runtime options for the FTP connection.
Returns TRUE on success, or FALSE on failure.
Syntax
ftp_set_option(ftp_connection,option,value)
| Parameters | Description |
|---|---|
| ftp_connection | Required. Specifies the FTP connection to use. |
| option | Required. Specifies the runtime option to set. Possible values:
|
| value | Required. Sets the value for the option parameter. If the option parameter is set to FTP_TIMEOUT_SEC, it specifies the maximum execution time limit for network operations (in seconds). If the option parameter is set to FTP_AUTOSEEK, the parameter must be either TRUE (enable automatic seek) or FALSE (disable automatic seek). |
Examples
<?php
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");
ftp_set_option($conn,FTP_TIMEOUT_SEC,120);
ftp_close($conn);
?>
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");
ftp_set_option($conn,FTP_TIMEOUT_SEC,120);
ftp_close($conn);
?>
Complete PHP FTP Reference Manual Other Extensions