PHP ftp_get_option() Function
Definition and Usage
The ftp_get_option() function returns various different option settings of the current FTP connection.
Syntax
ftp_get_option(ftp_connection,option)
Parameters | Description |
---|---|
ftp_connection | Required. Specifies the FTP connection to be used (FTP connection identifier). |
option |
Required. Specifies the option to be returned. Possible values include:
|
Description
If successful, it will return the value of the option, otherwise, if the given parameter option If the option is not supported, it will return false and also prompt an error message.
This function will return the connection handle as ftp_connection, specify the key value option value.
Example
<?php $conn = ftp_connect("ftp.testftp.com") or die("Could not connect"); ftp_login($conn,"admin","ert456"); echo ftp_get_option($conn,FTP_TIMEOUT_SEC); ftp_close($conn); ?>
Output:
90