ftp_set_option
Set various FTP runtime options.
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); ?>
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:
See the instructions below for details. |
value | Required. Sets the value of the option parameter. |
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.