diff --git a/functions/ftp.xml b/functions/ftp.xml index c2c6ef894b..9525efc62a 100644 --- a/functions/ftp.xml +++ b/functions/ftp.xml @@ -1,5 +1,5 @@ - + FTP functions FTP @@ -73,8 +73,8 @@ ftp_quit($conn_id); resource ftp_connect string host - int port - + int port + int timeout @@ -86,6 +86,18 @@ ftp_quit($conn_id); parameter specifies an alternate port to connect to. If it is omitted or zero, then the default FTP port, 21, will be used. + + The timeout parameter specifies the timeout for all + subsequent network operations. If ommited, the default value is 90 + seconds. The timeout can be changed and queried anytime with + ftp_set_option and + ftp_get_option. + + + This is parameter is only available in CVS. + + + @@ -620,6 +632,123 @@ $upload = ftp_put($conn_id, $destination_file, $source_file, FTP_ASCII); + + + ftp_set_option + + Set miscellaneous runtime FTP options. + + + + Description + + + bool ftp_set_option + resource stream + int option + mixed value + + + + + This function is only available in CVS. + + + + Returns &true; if the option could be set; &false; if not. A warning + message will be thrown if the option is not + supported or the passed value doesn't match the + expected value for the given option. + + + This function controls various runtime options for the specified FTP + stream. The value parameter depends on which + option parameter is choosen to be altered. + Currently, the following options are supported: + + Supported runtime FTP options + + + + FTP_TIMEOUT_SEC + Changes the timeout in seconds used for all network related + functions. Parameter value has be to of type + int and must be greater than 0. The default timeout is 90 + seconds. + + + +
+
+ + + <function>ftp_set_option</function> example + + + + +
+
+ + + + ftp_get_option + + Retrieves various runtime behaviours of the current FTP stream. + + + + Description + + + bool ftp_get_option + resource stream + int option + + + + + This function is only available in CVS. + + + + Returns the value on success or &false; if the given + option is not supposed. In the latter case a + warning message is also thrown. + + + This function returns the value for the requested + option from the specified FTP + stream. Currently, the following options are supported: + + Supported runtime FTP options + + + + FTP_TIMEOUT_SEC + Returns the current timeout used for network related + operations. + + + +
+
+ + + <function>ftp_get_option</function> example + + + + +
+
+