PHP ftp_get_option()Functions


PHP FTP 参考手册Complete PHP FTP Reference Manual

Definition and Usage

The ftp_get_option() function returns various runtime options for an FTP connection.

Syntax

ftp_get_option(ftp_connection,option)

Parameters Description
ftp_connection Required. Specifies the FTP connection to use.
option Required. Specifies the runtime option to return. Possible values:
  • FTP_TIMEOUT_SEC - Returns the time limit for network operations
  • FTP_AUTOSEEK - Returns TRUE if this option is set, otherwise returns FALSE.


Examples

<?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);
?>

The above code will output:

90


PHP FTP 参考手册Complete PHP FTP Reference Manual Other Extensions