ftp_get_option
Returns various different option settings for the current FTP connection.
ftp_get_option()
function returns various different option settings for the current FTP connection.
<?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); ?>
输出:
90
ftp_get_option ( ftp_connection , option )
parameter | describe |
---|---|
ftp_connection | Required. Specifies the FTP connection to be used (the identifier of the FTP connection). |
option |
Required. Specify the options to return. Possible values are:
|
If successful, the value of the option is returned. Otherwise, if the given parameter option option is not supported, the return is false and an error message will be prompted.
This function returns the connection handle as ftp_connection , specifying the value of the key value option .