Current Location: Home> Function Categories> ftp_set_option

ftp_set_option

Set various FTP runtime options.
Name:ftp_set_option
Category:Uncategorized
Programming Language:php
One-line Description:Set various FTP runtime options.

Definition and usage

ftp_set_option() function sets various FTP runtime options.

实例

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

grammar

 ftp_set_option ( ftp_connection , option , value )
parameter describe
ftp_connection Required. Specifies the FTP connection to be used (the identifier of the FTP connection).
option

Required. Specify the runtime options to be deleted. Possible values:

  • FTP_TIMEOUT_SEC
  • FTP_AUTOSEEK

See the instructions below for details.

value Required. Sets the value of the option parameter.

illustrate

The FTP_TIMEOUT_SEC option changes the timeout time of network transmission. The parameter value must be an integer and greater than 0. The default timeout is 90 seconds.

When the FTP_AUTOSEEK option is on, a GET or PUT request with resumepos or startpos parameters will first retrieve the specified location in the file. This option is on by default.

Similar Functions
Popular Articles