diff --git a/functions/ftp.xml b/functions/ftp.xml index ce411a2801..b506bb1df2 100644 --- a/functions/ftp.xml +++ b/functions/ftp.xml @@ -1,5 +1,5 @@ - + FTP functions FTP @@ -22,10 +22,10 @@ and when using PHP 3. - - - <function>ftp</function> example - + + + <function>ftp</function> example + <?php // set up basic connection $conn_id = ftp_connect("$ftp_server"); @@ -76,12 +76,14 @@ ftp_quit($conn_id); - Returns a FTP stream on success, &false; on error. + Returns a FTP stream on success, &false; on error. + ftp_connect opens up a FTP connection to the specified host. The port parameter specifies an alternate port to connect to. If it is - omitted or zero, then the default FTP port, 21, will be used. + omitted or zero, then the default FTP port, 21, will be used. + @@ -102,9 +104,11 @@ ftp_quit($conn_id); - Logs in the given FTP stream. + Logs in the given FTP stream. + - Returns &true; on success, &false; on error. + Returns &true; on success, &false; on error. + @@ -122,7 +126,8 @@ ftp_quit($conn_id); - Returns the current directory, or &false; on error. + Returns the current directory, or &false; on error. + @@ -140,9 +145,11 @@ ftp_quit($conn_id); - Changes to the parent directory. + Changes to the parent directory. + - Returns &true; on success, &false; on error. + Returns &true; on success, &false; on error. + @@ -161,7 +168,8 @@ ftp_quit($conn_id); - Changes to the specified directory. + Changes to the specified directory. + Returns &true; on success, &false; on error. @@ -182,7 +190,8 @@ ftp_quit($conn_id); - Creates the specified directory. + Creates the specified directory. + Returns the newly created directory name on success, &false; on error. @@ -203,7 +212,8 @@ ftp_quit($conn_id); - Removes the specified directory. + Removes the specified directory. + Returns &true; on success, &false; on error. @@ -224,7 +234,8 @@ ftp_quit($conn_id); - Returns an array of filenames on success, &false; on error. + Returns an array of filenames on success, &false; on error. + @@ -249,7 +260,8 @@ ftp_quit($conn_id); and returns the result as an array. Each array element corresponds to one line of text. The output is not parsed in any way. The system type identifier returned by ftp_systype - can be used to determine how the results should be interpreted. + can be used to determine how the results should be interpreted. + @@ -269,7 +281,8 @@ ftp_quit($conn_id); - Returns the remote system type, or &false; on error. + Returns the remote system type, or &false; on error. + @@ -292,9 +305,11 @@ ftp_quit($conn_id); pasv parameter is &true; (it turns off passive mode if pasv is &false;.) In passive mode, data connections are initiated by the client, - rather than by the server. + rather than by the server. + - Returns &true; on success, &false; on error. + Returns &true; on success, &false; on error. + @@ -322,7 +337,8 @@ ftp_quit($conn_id); FTP_BINARY. - Returns &true; on success, &false; on error. + Returns &true; on success, &false; on error. + @@ -348,9 +364,11 @@ ftp_quit($conn_id); from the FTP server, and writes it to the given file pointer, fp. The transfer mode specified must be either FTP_ASCII or - FTP_BINARY. + FTP_BINARY. + - Returns &true; on success, &false; on error. + Returns &true; on success, &false; on error. + @@ -377,7 +395,8 @@ ftp_quit($conn_id); FTP_ASCII or FTP_BINARY. - Returns &true; on success, &false; on error. + Returns &true; on success, &false; on error. + <function>ftp_put</function> example @@ -413,7 +432,8 @@ $upload = ftp_put ($conn_id, "$destination_file", "$source_file", FTP_ASCII); FTP_ASCII or FTP_BINARY - Returns &true; on success, &false; on error. + Returns &true; on success, &false; on error. + @@ -436,7 +456,8 @@ $upload = ftp_put ($conn_id, "$destination_file", "$source_file", FTP_ASCII); error occurs, of if the file does not exist, -1 is returned. Not all servers support this feature. - Returns the file size on success, or -1 on error. + Returns the file size on success, or -1 on error. + @@ -461,7 +482,8 @@ $upload = ftp_put ($conn_id, "$destination_file", "$source_file", FTP_ASCII); support this feature. - Returns a UNIX timestamp on success, or -1 on error. + Returns a UNIX timestamp on success, or -1 on error. + ftp_mdtm does not work with directories. @@ -485,7 +507,6 @@ $upload = ftp_put ($conn_id, "$destination_file", "$source_file", FTP_ASCII); string to - ftp_rename renames the file or directory currently named from to the new name @@ -493,6 +514,7 @@ $upload = ftp_put ($conn_id, "$destination_file", "$source_file", FTP_ASCII); Returns &true; on success, &false; on error. + @@ -515,7 +537,8 @@ $upload = ftp_put ($conn_id, "$destination_file", "$source_file", FTP_ASCII); path from the FTP server. - Returns &true; on success, &false; on error. + Returns &true; on success, &false; on error. + @@ -538,9 +561,11 @@ $upload = ftp_put ($conn_id, "$destination_file", "$source_file", FTP_ASCII); cmd to the FTP server. SITE commands are not standardized, and vary from server to server. They are useful for handling such things as file permissions and group - membership. + membership. + - Returns &true; on success, &false; on error. + Returns &true; on success, &false; on error. +