Current Location: Home> Function Categories> ftp_get_option

ftp_get_option

Returns various different option settings for the current FTP connection.
Name:ftp_get_option
Category:Uncategorized
Programming Language:php
One-line Description:Returns various different option settings for the current FTP connection.

Definition and usage

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

grammar

 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:

  • FTP_TIMEOUT_SEC - Returns the time limit for network operation
  • FTP_AUTOSEEK - Return true if set, otherwise return false

illustrate

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 .

Similar Functions
Popular Articles