From aa38e693e3b8ee28688bf24055e929f9efe3cb25 Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Sun, 16 Jan 2005 05:09:23 +0000 Subject: [PATCH] Swith ref.zip to the new structure git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@177332 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/ftp/functions/ftp-alloc.xml | 133 +++++++++----- reference/ftp/functions/ftp-cdup.xml | 88 ++++++---- reference/ftp/functions/ftp-chdir.xml | 98 +++++++---- reference/ftp/functions/ftp-chmod.xml | 112 ++++++++---- reference/ftp/functions/ftp-close.xml | 97 ++++++---- reference/ftp/functions/ftp-connect.xml | 149 +++++++++++----- reference/ftp/functions/ftp-delete.xml | 88 ++++++---- reference/ftp/functions/ftp-exec.xml | 98 +++++++---- reference/ftp/functions/ftp-fget.xml | 162 ++++++++++++----- reference/ftp/functions/ftp-fput.xml | 162 ++++++++++++----- reference/ftp/functions/ftp-get-option.xml | 128 +++++++++----- reference/ftp/functions/ftp-get.xml | 162 ++++++++++++----- reference/ftp/functions/ftp-login.xml | 96 +++++++--- reference/ftp/functions/ftp-mdtm.xml | 110 +++++++----- reference/ftp/functions/ftp-mkdir.xml | 97 ++++++---- reference/ftp/functions/ftp-nb-continue.xml | 77 +++++--- reference/ftp/functions/ftp-nb-fget.xml | 145 ++++++++++----- reference/ftp/functions/ftp-nb-fput.xml | 145 ++++++++++----- reference/ftp/functions/ftp-nb-get.xml | 185 +++++++++++++------- reference/ftp/functions/ftp-nb-put.xml | 153 +++++++++++----- reference/ftp/functions/ftp-nlist.xml | 97 ++++++---- reference/ftp/functions/ftp-pasv.xml | 92 ++++++---- reference/ftp/functions/ftp-put.xml | 160 ++++++++++++----- reference/ftp/functions/ftp-pwd.xml | 81 ++++++--- reference/ftp/functions/ftp-quit.xml | 27 ++- reference/ftp/functions/ftp-raw.xml | 99 +++++++---- reference/ftp/functions/ftp-rawlist.xml | 147 +++++++++++----- reference/ftp/functions/ftp-rename.xml | 100 +++++++---- reference/ftp/functions/ftp-rmdir.xml | 100 +++++++---- reference/ftp/functions/ftp-set-option.xml | 163 ++++++++++------- reference/ftp/functions/ftp-site.xml | 108 ++++++++---- reference/ftp/functions/ftp-size.xml | 106 +++++++---- reference/ftp/functions/ftp-ssl-connect.xml | 143 +++++++++------ reference/ftp/functions/ftp-systype.xml | 79 ++++++--- 34 files changed, 2689 insertions(+), 1298 deletions(-) diff --git a/reference/ftp/functions/ftp-alloc.xml b/reference/ftp/functions/ftp-alloc.xml index 4b5deb6c94..eaf2d71dfd 100644 --- a/reference/ftp/functions/ftp-alloc.xml +++ b/reference/ftp/functions/ftp-alloc.xml @@ -1,39 +1,78 @@ - - - - ftp_alloc - Allocates space for a file to be uploaded - - - Description - - boolftp_alloc - resourceftp_stream - intfilesize - stringresult - - - Sends an ALLO command to the remote FTP server to allocate filesize - bytes of space. Returns &true; on success, or &false; on failure. - - - - Many FTP servers do not support this command. These servers may return a failure - code (&false;) indicating the command is not supported or a success code (&true;) - to indicate that pre-allocation is not necessary and the client should continue - as though the operation were successful. Because of this, it may be best to reserve - this function for servers which explicitly require preallocation. - - - - A textual representation of the servers response will be returned by reference in - result is a variable is provided. - - - - <function>ftp_alloc</function> example - + + + + ftp_alloc + Allocates space for a file to be uploaded + + + &reftitle.description; + + boolftp_alloc + resourceftp_stream + intfilesize + stringresult + + + Sends an ALLO command to the remote FTP server to + allocate space for a file to be uploaded. + + + + Many FTP servers do not support this command. These servers may return a failure + code (&false;) indicating the command is not supported or a success code (&true;) + to indicate that pre-allocation is not necessary and the client should continue + as though the operation were successful. Because of this, it may be best to reserve + this function for servers which explicitly require preallocation. + + + + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + filezise + + + The number of bytes to allocate. + + + + + return + + + A textual representation of the servers response will be returned by + reference in result if a variable is provided. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.examples; + + + <function>ftp_alloc</function> example + ]]> - - - - - See also: - ftp_put, and - ftp_fput. - - - + + + + + + &reftitle.seealso; + + + ftp_put + ftp_fput + + + + - - - - ftp_cdup - Changes to the parent directory - - - Description - - boolftp_cdup - resourceftp_stream - - - Changes to the parent directory. - - - - <function>ftp_cdup</function> example - + + + + ftp_cdup + Changes to the parent directory + + + &reftitle.description; + + boolftp_cdup + resourceftp_stream + + + Changes to the parent directory. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.examples; + + + <function>ftp_cdup</function> example + ]]> - - - - - &return.success; - - - See also ftp_chdir. - - - + + + + + + &reftitle.seealso; + + + ftp_chdir + ftp_pwd + + + + - - - - ftp_chdir - Changes directories on a FTP server - - - Description - - boolftp_chdir - resourceftp_stream - stringdirectory - - - Changes the current directory to the specified directory. - - - &return.success; - If changing directory fails, PHP will also throw a warning. - - - <function>ftp_chdir</function> example - + + + + ftp_chdir + Changes the current directory on a FTP server + + + &reftitle.description; + + boolftp_chdir + resourceftp_stream + stringdirectory + + + Changes the current directory to the specified one. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + directory + + + The target directory. + + + + + + + + &reftitle.returnvalues; + + &return.success; + If changing directory fails, PHP will also throw a warning. + + + + &reftitle.examples; + + + <function>ftp_chdir</function> example + ]]> - - - - See also ftp_cdup. - - - + + + + + + &reftitle.seealso; + + + ftp_cdup + ftp_pwd + + + + - - - ftp_chmod - Set permissions on a file via FTP - - - Description - - intftp_chmod - resourceftp_stream - intmode - stringfilename - - - Sets the permissions on the remote file specified by - filename to mode - given as an octal value. - - - Returns mode on success, or &false; on failure. - - - - <function>ftp_chmod</function> example - + + + + ftp_chmod + Set permissions on a file via FTP + + + &reftitle.description; + + intftp_chmod + resourceftp_stream + intmode + stringfilename + + + Sets the permissions on the specified remote file to + mode. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + mode + + + The new permissions, given as an octal value. + + + + + filename + + + The remote file. + + + + + + + + &reftitle.returnvalues; + + Returns the new file permissions on success or &false; on error. + + + + &reftitle.examples; + + + <function>ftp_chmod</function> example + ]]> - - - - - Returns the new file permissions on success or &false; on error. - - - See also chmod. - - - + + + + + + &reftitle.seealso; + + + chmod + + + + - - - - ftp_close - Closes an FTP connection - - - Description - - boolftp_close - resourceftp_stream - - - ftp_close closes ftp_stream - and releases the resource. After calling this function, - you can no longer use the FTP connection and must create a new one - with ftp_connect. - - - &return.success; - - - - <function>ftp_close</function> example - + + + + ftp_close + Closes an FTP connection + + + &reftitle.description; + + boolftp_close + resourceftp_stream + + + ftp_close closes the given link identifier + and releases the resource. + + + + After calling this function, you can no longer use the FTP connection and + must create a new one with ftp_connect. + + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.examples; + + + <function>ftp_close</function> example + ]]> - - - - - See also ftp_connect - - - + + + + + + &reftitle.seealso; + + + ftp_connect + + + + - - - - ftp_connect - Opens an FTP connection - - - Description - - resourceftp_connect - stringhost - intport - inttimeout - - - Returns a FTP stream on success or &false; on error. - - - ftp_connect opens an FTP connection to the - specified host. host - shouldn't have any trailing slashes and shouldn't be prefixed with - ftp://. The port - parameter specifies an alternate port to connect to. If it is - omitted or set to zero, then the default FTP port, 21, will be used. - - - The timeout parameter specifies the timeout for all - subsequent network operations. If omitted, the default value is 90 - seconds. The timeout can be changed and queried at any time with - ftp_set_option and - ftp_get_option. - + + + + ftp_connect + Opens an FTP connection + + + &reftitle.description; + + resourceftp_connect + stringhost + intport + inttimeout + + + ftp_connect opens an FTP connection to the + specified host. + + + + &reftitle.parameters; + + + + host + - The timeout parameter became available in PHP 4.2.0. + The FTP server address. This parameter shouldn't have any trailing + slashes and shouldn't be prefixed with ftp://. - - - - <function>ftp_connect</function> example - + + + + port + + + This parameter specifies an alternate port to connect to. If it is + omitted or set to zero, then the default FTP port, 21, will be used. + + + + + timeout + + + This parameter specifies the timeout for all subsequent network operations. + If omitted, the default value is 90 seconds. The timeout can be changed and + queried at any time with ftp_set_option and + ftp_get_option. + + + + + + + + &reftitle.returnvalues; + + Returns a FTP stream on success or &false; on error. + + + + &reftitle.examples; + + + <function>ftp_connect</function> example + ]]> - - - - See also ftp_close, and - ftp_ssl_connect. - - - + + + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 4.2.0 + + timeout was added. + + + + + + + + + &reftitle.seealso; + + + ftp_close + ftp_ssl_connect + + + + - - - - ftp_delete - Deletes a file on the FTP server - - - Description - - boolftp_delete - resourceftp_stream - stringpath - - - ftp_delete deletes the file specified by - path from the FTP server. - - - - <function>ftp_delete</function> example - + + + + ftp_delete + Deletes a file on the FTP server + + + &reftitle.description; + + boolftp_delete + resourceftp_stream + stringpath + + + ftp_delete deletes the file specified by + path from the FTP server. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + path + + + The file to delete. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.examples; + + + <function>ftp_delete</function> example + ]]> - - - - - &return.success; - - - + + + + + - - - - ftp_exec - Requests execution of a program on the FTP server - - - Description - - boolftp_exec - resourceftp_stream - stringcommand - - - Sends a SITE EXEC command request to the FTP - server. Returns &true; if the command was successful (server sent response code: - 200); otherwise returns &false;. - - - - <function>ftp_exec</function> example - + + + + ftp_exec + Requests execution of a program on the FTP server + + + &reftitle.description; + + boolftp_exec + resourceftp_stream + stringcommand + + + Sends a SITE EXEC command request to the FTP + server. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + command + + + The command to execute. + + + + + + + + &reftitle.returnvalues; + + Returns &true; if the command was successful (server sent response code: + 200); otherwise returns &false;. + + + + &reftitle.examples; + + + <function>ftp_exec</function> example + ]]> - - - - - See also ftp_raw. - - - + + + + + + &reftitle.seealso; + + + ftp_raw + + + + - - - - ftp_fget - Downloads a file from the FTP server and saves to an open file - - - Description - - boolftp_fget - resourceftp_stream - resourcehandle - stringremote_file - intmode - intresumepos - - - ftp_fget retrieves remote_file - from the FTP server, and writes it to the given file pointer, - handle. The transfer mode - specified must be either FTP_ASCII or - FTP_BINARY. - - - - <function>ftp_fget</function> example - + + + + ftp_fget + Downloads a file from the FTP server and saves to an open file + + + &reftitle.description; + + boolftp_fget + resourceftp_stream + resourcehandle + stringremote_file + intmode + intresumepos + + + ftp_fget retrieves remote_file + from the FTP server, and writes it to the given file pointer. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + handle + + + An open file pointer in which we store the data. + + + + + remote_file + + + The remote file path. + + + + + mode + + + The transfer mode. Must be either FTP_ASCII or + FTP_BINARY. + + + + + resumepos + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.examples; + + + <function>ftp_fget</function> example + ]]> - - - - - - The resumepos parameter was added in PHP 4.3.0. - - - - &return.success; - - - See also ftp_get, ftp_nb_get and - ftp_nb_fget. - - - + + + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 4.3.0 + + resumepos was added. + + + + + + + + + &reftitle.seealso; + + + ftp_get + ftp_nb_get + ftp_nb_fget + + + + - - - - ftp_fput - Uploads from an open file to the FTP server - - - Description - - boolftp_fput - resourceftp_stream - stringremote_file - resourcehandle - intmode - intstartpos - - - ftp_fput uploads the data from the file pointer - handle until the end of the file is reached. The results are stored - in remote_file on the FTP server. The transfer - mode specified must be either - FTP_ASCII or FTP_BINARY. - - - - <function>ftp_fput</function> example - + + + + ftp_fput + Uploads from an open file to the FTP server + + + &reftitle.description; + + boolftp_fput + resourceftp_stream + stringremote_file + resourcehandle + intmode + intstartpos + + + ftp_fput uploads the data from a file pointer + to a remote file on the FTP server. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + remote_file + + + The remote file path. + + + + + handle + + + An open file pointer on the local file. Reading stops at end of file. + + + + + mode + + + The transfer mode. Must be either FTP_ASCII or + FTP_BINARY. + + + + + startpos + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.examples; + + + <function>ftp_fput</function> example + ]]> - - - - - - The startpos parameter was added in PHP 4.3.0. - - - - &return.success; - - - See also ftp_put, ftp_nb_fput, - and ftp_nb_put. - - - + + + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 4.3.0 + + startpos was added. + + + + + + + + + &reftitle.seealso; + + + ftp_put + ftp_nb_fput + ftp_nb_put + + + + - - - - ftp_get_option - Retrieves various runtime behaviours of the current FTP stream - - - Description - - mixedftp_get_option - resourceftp_stream - intoption - - - Returns the value on success or &false; if the given - option is not supported. 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 - + + + + ftp_get_option + Retrieves various runtime behaviours of the current FTP stream + + + &reftitle.description; + + mixedftp_get_option + resourceftp_stream + intoption + + + This function returns the value for the requested + option from the specified FTP connection. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + option + + + Currently, the following options are supported: + + Supported runtime FTP options + + + + FTP_TIMEOUT_SEC + + Returns the current timeout used for network related operations. + + + + +
+
+
+
+
+
+
+ + &reftitle.returnvalues; + + Returns the value on success or &false; if the given + option is not supported. In the latter case, a + warning message is also thrown. + + + + &reftitle.examples; + + + <function>ftp_get_option</function> example + ]]> - - - - See also ftp_set_option. - - -
+
+
+ +
+ + &reftitle.seealso; + + + ftp_set_option + + + +
- - - - ftp_get - Downloads a file from the FTP server - - - Description - - boolftp_get - resourceftp_stream - stringlocal_file - stringremote_file - intmode - intresumepos - - - ftp_get retrieves remote_file - from the FTP server, and saves it to local_file - locally. The transfer mode specified must - be either FTP_ASCII or - FTP_BINARY. - - - - The resumepos parameter was added in PHP 4.3.0. - - - - &return.success; - - - - <function>ftp_get</function> example - + + + + ftp_get + Downloads a file from the FTP server + + + &reftitle.description; + + boolftp_get + resourceftp_stream + stringlocal_file + stringremote_file + intmode + intresumepos + + + ftp_get retrieves a remote file from the FTP server, + and saves it into a local file. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + local_file + + + The local file path. + + + + + remote_file + + + The remote file path. + + + + + mode + + + The transfer mode. Must be either FTP_ASCII or + FTP_BINARY. + + + + + resumepos + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.examples; + + + <function>ftp_get</function> example + ]]> - - - - - See also ftp_fget, ftp_nb_get and - ftp_nb_fget. - - - + + + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 4.3.0 + + resumepos was added. + + + + + + + + + &reftitle.seealso; + + + ftp_fget + ftp_nb_get + ftp_nb_fget + + + + - - - - ftp_login - Logs in to an FTP connection - - - Description - - boolftp_login - resourceftp_stream - stringusername - stringpassword - - - Logs in to the given FTP stream. - - - &return.success; - If login fails, PHP will also throw a warning. - - - <function>ftp_login</function> example - + + + + ftp_login + Logs in to an FTP connection + + + &reftitle.description; + + boolftp_login + resourceftp_stream + stringusername + stringpassword + + + Logs in to the given FTP stream. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + username + + + The username (USER). + + + + + password + + + The password (PASS). + + + + + + + + &reftitle.returnvalues; + + &return.success; + If login fails, PHP will also throw a warning. + + + + &reftitle.examples; + + + <function>ftp_login</function> example + ]]> - - - - + + + + + - - - - ftp_mdtm - Returns the last modified time of the given file - - - Description - - intftp_mdtm - resourceftp_stream - stringremote_file - - - ftp_mdtm checks the last modified time for a - file, and returns it as a Unix timestamp. If an error occurs, or - the file does not exist, -1 is returned. - - - Returns a Unix timestamp on success, or -1 on error. - - - - <function>ftp_mdtm</function> example - + + + + ftp_mdtm + Returns the last modified time of the given file + + + &reftitle.description; + + intftp_mdtm + resourceftp_stream + stringremote_file + + + ftp_mdtm gets the last modified time for a remote + file. + + + + Not all servers support this feature! + + + + + ftp_mdtm does not work with directories. + + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + remote_file + + + The file from which to extract the last modification time. + + + + + + + + &reftitle.returnvalues; + + Returns the last modified time as a Unix timestamp on success, or -1 on + error. + + + + &reftitle.examples; + + + <function>ftp_mdtm</function> example + ]]> - - - - - - Not all servers support this feature! - - - - - ftp_mdtm does not work with directories. - - - - + + + + + - - - - ftp_mkdir - Creates a directory - - - Description - - stringftp_mkdir - resourceftp_stream - stringdirectory - - - Creates the specified directory on the FTP server. - - - Returns the newly created directory name on success or &false; on error. - - - - <function>ftp_mkdir</function> example - + + + + ftp_mkdir + Creates a directory + + + &reftitle.description; + + stringftp_mkdir + resourceftp_stream + stringdirectory + + + Creates the specified directory on the FTP server. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + directory + + + The name of the directory that will be created. + + + + + + + + &reftitle.returnvalues; + + Returns the newly created directory name on success or &false; on error. + + + + &reftitle.examples; + + + <function>ftp_mkdir</function> example + ]]> - - - - - See also ftp_rmdir. - - - + + + + + + &reftitle.seealso; + + + ftp_rmdir + + + + - - - ftp_nb_continue - Continues retrieving/sending a file (non-blocking) - - - Description - - intftp_nb_continue - resourceftp_stream - - - Continues retrieving/sending a file non-blocking. - - - - <function>ftp_nb_continue</function> example - + + + + ftp_nb_continue + Continues retrieving/sending a file (non-blocking) + + + &reftitle.description; + + intftp_nb_continue + resourceftp_stream + + + Continues retrieving/sending a file non-blocking. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + + + + &reftitle.returnvalues; + + Returns FTP_FAILED or FTP_FINISHED + or FTP_MOREDATA. + + + + &reftitle.examples; + + + <function>ftp_nb_continue</function> example + ]]> - - - - - Returns FTP_FAILED or FTP_FINISHED - or FTP_MOREDATA. - - - + + + + + - - - ftp_nb_fget - Retrieves a file from the FTP server and writes it to an open file (non-blocking) - - - Description - - intftp_nb_fget - resourceftp_stream - resourcehandle - stringremote_file - intmode - intresumepos - - - ftp_nb_fget retrieves remote_file - from the FTP server, and writes it to the given file pointer, - handle. The transfer mode - specified must be either FTP_ASCII or - FTP_BINARY. The difference between this function and the - ftp_fget is that this function retrieves the file - asynchronously, so your program can perform other operations while the - file is being downloaded. - - - - <function>ftp_nb_fget</function> example - + + + + ftp_nb_fget + Retrieves a file from the FTP server and writes it to an open file (non-blocking) + + + &reftitle.description; + + intftp_nb_fget + resourceftp_stream + resourcehandle + stringremote_file + intmode + intresumepos + + + ftp_nb_fget retrieves a remote file from the FTP + server. + + + The difference between this function and ftp_fget is + that this function retrieves the file asynchronously, so your program can + perform other operations while the file is being downloaded. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + handle + + + An open file pointer in which we store the data. + + + + + remote_file + + + The remote file path. + + + + + mode + + + The transfer mode. Must be either FTP_ASCII or + FTP_BINARY. + + + + + resumepos + + + + + + + + + &reftitle.returnvalues; + + Returns FTP_FAILED or FTP_FINISHED + or FTP_MOREDATA. + + + + &reftitle.examples; + + + <function>ftp_nb_fget</function> example + ]]> - - - - - Returns FTP_FAILED, FTP_FINISHED, or - FTP_MOREDATA. - - - See also ftp_nb_get, - ftp_nb_continue, ftp_fget, and - ftp_get. - - - + + + + + + &reftitle.seealso; + + + ftp_nb_get + ftp_nb_continue + ftp_fget + ftp_fget + + + + - - - ftp_nb_fput - Stores a file from an open file to the FTP server (non-blocking) - - - Description - - intftp_nb_fput - resourceftp_stream - stringremote_file - resourcehandle - intmode - intstartpos - - - ftp_nb_fput uploads the data from the file pointer - handle until it reaches the end of the file. The - results are stored in remote_file on the FTP server. - The transfer mode specified must be either - FTP_ASCII or FTP_BINARY. The - difference between this function and the ftp_fput is - that this function uploads the file asynchronously, so your program can - perform other operations while the file is being uploaded. - - - - <function>ftp_nb_fput</function> example - + + + + ftp_nb_fput + Stores a file from an open file to the FTP server (non-blocking) + + + &reftitle.description; + + intftp_nb_fput + resourceftp_stream + stringremote_file + resourcehandle + intmode + intstartpos + + + ftp_nb_fput uploads the data from a file pointer to + a remote file on the FTP server. + + + The difference between this function and the ftp_fput + is that this function uploads the file asynchronously, so your program can + perform other operations while the file is being uploaded. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + remote_file + + + The remote file path. + + + + + handle + + + An open file pointer on the local file. Reading stops at end of file. + + + + + mode + + + The transfer mode. Must be either FTP_ASCII or + FTP_BINARY. + + + + + startpos + + + + + + + + + &reftitle.returnvalues; + + Returns FTP_FAILED or FTP_FINISHED + or FTP_MOREDATA. + + + + &reftitle.examples; + + + <function>ftp_nb_fput</function> example + ]]> - - - - - Returns FTP_FAILED, FTP_FINISHED, or - FTP_MOREDATA. - - - See also ftp_nb_put, - ftp_nb_continue, ftp_put - and ftp_fput. - - - + + + + + + &reftitle.seealso; + + + ftp_nb_put + ftp_nb_continue + ftp_put + ftp_fput + + + + - - - ftp_nb_get - Retrieves a file from the FTP server and writes it to a local file (non-blocking) - - - Description - - intftp_nb_get - resourceftp_stream - stringlocal_file - stringremote_file - intmode - intresumepos - - - ftp_nb_get retrieves remote_file - from the FTP server, and saves it to local_file - locally. The transfer mode specified must - be either FTP_ASCII or - FTP_BINARY. The difference between this function and the - ftp_get is that this function retrieves the file - asynchronously, so your program can perform other operations while the - file is being downloaded. - - - Returns FTP_FAILED, FTP_FINISHED, or - FTP_MOREDATA. - - - - <function>ftp_nb_get</function> example - + + + + ftp_nb_get + Retrieves a file from the FTP server and writes it to a local file (non-blocking) + + + &reftitle.description; + + intftp_nb_get + resourceftp_stream + stringlocal_file + stringremote_file + intmode + intresumepos + + + ftp_nb_get retrieves a remote file from the FTP server, + and saves it into a local file. + + + The difference between this function and ftp_get is that + this function retrieves the file asynchronously, so your program can perform + other operations while the file is being downloaded. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + local_file + + + The local file path. + + + + + remote_file + + + The remote file path. + + + + + mode + + + The transfer mode. Must be either FTP_ASCII or + FTP_BINARY. + + + + + resumepos + + + + + + + + + &reftitle.returnvalues; + + Returns FTP_FAILED or FTP_FINISHED + or FTP_MOREDATA. + + + + &reftitle.examples; + + + <function>ftp_nb_get</function> example + ]]> - - - - Resuming a download with <function>ftp_nb_get</function> - + + + + Resuming a download with <function>ftp_nb_get</function> + ]]> - - - - - Resuming a download at position 100 to a new - file with <function>ftp_nb_get</function> - - + + + + + Resuming a download at position 100 to a new + file with <function>ftp_nb_get</function> + + ]]> - - - - - In the example above, "newfile" is 100 bytes smaller - than "README" on the FTP server because we started - reading at offset 100. If we have not have disabled - FTP_AUTOSEEK, the first 100 bytes of - "newfile" will be '\0'. - - - See also ftp_nb_fget, - ftp_nb_continue, - ftp_get, and ftp_fget. - - - + + + + + In the example above, newfile is 100 bytes smaller + than README on the FTP server because we started + reading at offset 100. If we didn't disable + FTP_AUTOSEEK, the first 100 bytes of + newfile would be '\0'. + + + + &reftitle.seealso; + + + ftp_nb_fget + ftp_nb_continue + ftp_fget + ftp_fget + + + + - - - ftp_nb_put - Stores a file on the FTP server (non-blocking) - - - Description - - intftp_nb_put - resourceftp_stream - stringremote_file - stringlocal_file - intmode - intstartpos - - - ftp_nb_put stores local_file - on the FTP server, as remote_file. The transfer - mode specified must be either - FTP_ASCII or FTP_BINARY. - The difference between this function and the ftp_put - is that this function uploads the file asynchronously, so your program can - perform other operations while the file is being uploaded. - - - Returns FTP_FAILED, FTP_FINISHED, or - FTP_MOREDATA. - - - - <function>ftp_nb_put</function> example - + + + + ftp_nb_put + Stores a file on the FTP server (non-blocking) + + + &reftitle.description; + + intftp_nb_put + resourceftp_stream + stringremote_file + stringlocal_file + intmode + intstartpos + + + ftp_nb_put stores a local file on the FTP server. + + + The difference between this function and the ftp_put + is that this function uploads the file asynchronously, so your program can + perform other operations while the file is being uploaded. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + remote_file + + + The remote file path. + + + + + local_file + + + The local file path. + + + + + mode + + + The transfer mode. Must be either FTP_ASCII or + FTP_BINARY. + + + + + startpos + + + + + + + + + &reftitle.returnvalues; + + Returns FTP_FAILED or FTP_FINISHED + or FTP_MOREDATA. + + + + &reftitle.examples; + + + <function>ftp_nb_put</function> example + ]]> - - - - Resuming an upload with <function>ftp_nb_put</function> - + + + + Resuming an upload with <function>ftp_nb_put</function> + ]]> - - - - - See also ftp_nb_fput, - ftp_nb_continue, ftp_put, - and ftp_fput. - - - + + + + + + &reftitle.seealso; + + + ftp_nb_fput + ftp_nb_continue + ftp_put + ftp_fput + + + + - - - - ftp_nlist - Returns a list of files in the given directory - - - Description - - arrayftp_nlist - resourceftp_stream - stringdirectory - - - Returns an array of filenames from the specified directory - on success or &false; on error. - - - <function>ftp_nlist</function> example - + + + + ftp_nlist + Returns a list of files in the given directory + + + &reftitle.description; + + arrayftp_nlist + resourceftp_stream + stringdirectory + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + directory + + + The listed directory. + + + + + + + + &reftitle.returnvalues; + + Returns an array of filenames from the specified directory on success or + &false; on error. + + + + &reftitle.examples; + + + <function>ftp_nlist</function> example + ]]> - - &example.outputs.similar; - + + &example.outputs.similar; + @@ -49,13 +78,19 @@ array(3) { [2]=> string(3) "www" ]]> - - - - See also ftp_rawlist. - - - + + + + + + &reftitle.seealso; + + + ftp_rawlist + + + + - - - - ftp_pasv - Turns passive mode on or off - - - Description - - boolftp_pasv - resourceftp_stream - boolpasv - - - ftp_pasv turns on passive mode if the - 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. - - - - <function>ftp_pasv</function> example - + + + + ftp_pasv + Turns passive mode on or off + + + &reftitle.description; + + boolftp_pasv + resourceftp_stream + boolpasv + + + ftp_pasv turns on or off passive mode. In + passive mode, data connections are initiated by the client, + rather than by the server. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + pasv + + + If &true;, the passive mode is turned on, else it's turned off. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.examples; + + + <function>ftp_pasv</function> example + ]]> - - - - - &return.success; - - - + + + + + - - - - ftp_put - Uploads a file to the FTP server - - - Description - - boolftp_put - resourceftp_stream - stringremote_file - stringlocal_file - intmode - intstartpos - - - ftp_put stores local_file - on the FTP server, as remote_file. The transfer - mode specified must be either - FTP_ASCII or FTP_BINARY. - - - - The startpos parameter was added in PHP 4.3.0. - - - - &return.success; - - - - <function>ftp_put</function> example - + + + + ftp_put + Uploads a file to the FTP server + + + &reftitle.description; + + boolftp_put + resourceftp_stream + stringremote_file + stringlocal_file + intmode + intstartpos + + + ftp_put stores a local file on the FTP server. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + remote_file + + + The remote file path. + + + + + local_file + + + The local file path. + + + + + mode + + + The transfer mode. Must be either FTP_ASCII or + FTP_BINARY. + + + + + startpos + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.examples; + + + <function>ftp_put</function> example + ]]> - - - - - See also ftp_fput, ftp_nb_fput, - and ftp_nb_put. - - - + + + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 4.3.0 + + startpos was added. + + + + + + + + + &reftitle.seealso; + + + ftp_fput + ftp_nb_fput + ftp_nb_put + + + + - - - - ftp_pwd - Returns the current directory name - - - Description - - stringftp_pwd - resourceftp_stream - - - Returns the current directory or &false; on error. - - - - <function>ftp_pwd</function> example - + + + + ftp_pwd + Returns the current directory name + + + &reftitle.description; + + stringftp_pwd + resourceftp_stream + + + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + + + + &reftitle.returnvalues; + + Returns the current directory name or &false; on error. + + + + &reftitle.examples; + + + <function>ftp_pwd</function> example + ]]> - - - - - + + + + + + &reftitle.seealso; + + + ftp_chdir + ftp_cdup + + + + - - - - ftp_quit - Alias of ftp_close - - - Description - - This function is an alias of ftp_close. - - - + + + + ftp_quit + Alias of ftp_close + + + &reftitle.description; + + This function is an alias of ftp_close. + + + - - - ftp_raw - Sends an arbitrary command to an FTP server - - - Description - - arrayftp_raw - resourceftp_stream - stringcommand - - - Sends an arbitrary command to the FTP - server. Returns the server's response as an array of strings. - No parsing is performed on the response string, nor does - ftp_raw determine if the command succeeded. - - - - Using <function>ftp_raw</function> to login to an FTP server manually. - + + + + ftp_raw + Sends an arbitrary command to an FTP server + + + &reftitle.description; + + arrayftp_raw + resourceftp_stream + stringcommand + + + Sends an arbitrary command to the FTP server. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + command + + + The command to execute. + + + + + + + + &reftitle.returnvalues; + + Returns the server's response as an array of strings. + No parsing is performed on the response string, nor does + ftp_raw determine if the command succeeded. + + + + &reftitle.examples; + + + Using <function>ftp_raw</function> to login to an FTP server manually. + ]]> - - - - - See Also: - ftp_exec - - - + + + + + + &reftitle.seealso; + + + ftp_exec + + + + - - - - ftp_rawlist - Returns a detailed list of files in the given directory - - - Description - - arrayftp_rawlist - resourceftp_stream - stringdirectory - boolrecursive - - - ftp_rawlist executes the FTP LIST command, - 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. - - - Optional parameter recursive is available since PHP - 4.3.0. - - - - <function>ftp_rawlist</function> example - + + + + ftp_rawlist + Returns a detailed list of files in the given directory + + + &reftitle.description; + + arrayftp_rawlist + resourceftp_stream + stringdirectory + boolrecursive + + + ftp_rawlist executes the FTP + LIST command, and returns the result as an array. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + directory + + + The directory path. + + + + + recursive + + + If set to &true;, the issued command will be LIST -R. + + + + + + + + &reftitle.returnvalues; + + Returns an array where each 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. + + + + &reftitle.examples; + + + <function>ftp_rawlist</function> example + ]]> - - &example.outputs.similar; - + + &example.outputs.similar; + @@ -61,14 +98,42 @@ array(3) { string(73) "lrwxrwxrwx 1 vincent vincent 11 Jul 12 12:16 www -> public_html" } ]]> - - - - - See also ftp_nlist. - - - + + + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 4.3.0 + + recursive was added. + + + + + + + + + &reftitle.seealso; + + + ftp_nlist + + + + - - - - ftp_rename - Renames a file on the FTP server - - - Description - - boolftp_rename - resourceftp_stream - stringfrom - stringto - - - ftp_rename renames the file or directory that is - currently named from to the new name - to, using the FTP stream - ftp_stream. - - - - <function>ftp_rename</function> example - + + + + ftp_rename + Renames a file or a directory on the FTP server + + + &reftitle.description; + + boolftp_rename + resourceftp_stream + stringoldname + stringnewname + + + ftp_rename renames a file or a directory on the FTP + server. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + oldname + + + The old file/directory name. + + + + + newname + + + The new name. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.examples; + + + <function>ftp_rename</function> example + ]]> - - - - - &return.success; - - - + + + + + - - - - ftp_rmdir - Removes a directory - - - Description - - boolftp_rmdir - resourceftp_stream - stringdirectory - - - Removes the specified directory. - directory must be either an absolute or relative - path to an empty directory. - - - &return.success; - - - - <function>ftp_rmdir</function> example - + + + + ftp_rmdir + Removes a directory + + + &reftitle.description; + + boolftp_rmdir + resourceftp_stream + stringdirectory + + + Removes the specified directory on the FTP server. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + directory + + + The directory to delete. This must be either an absolute or relative + path to an empty directory. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.examples; + + + <function>ftp_rmdir</function> example + ]]> - - - - - See also ftp_mkdir. - - - + + + + + + &reftitle.seealso; + + + ftp_mkdir + + + + - - - - ftp_set_option - Set miscellaneous runtime FTP options - - - Description - - boolftp_set_option - resourceftp_stream - intoption - mixedvalue - - - 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 chosen 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. value must be an integer that is greater than 0. - The default timeout is 90 seconds. - - - FTP_AUTOSEEK - When enabled, GET or PUT requests with - a resumepos or startpos - parameter will first seek to the requested position within the file. This is enabled - by default. - - - - -
-
- - - <function>ftp_set_option</function> example - + + + + ftp_set_option + Set miscellaneous runtime FTP options + + + &reftitle.description; + + boolftp_set_option + resourceftp_stream + intoption + mixedvalue + + + This function controls various runtime options for the specified FTP + stream. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + option + + + Currently, the following options are supported: + + Supported runtime FTP options + + + + FTP_TIMEOUT_SEC + + Changes the timeout in seconds used for all network related + functions. value must be an integer that + is greater than 0. The default timeout is 90 seconds. + + + + FTP_AUTOSEEK + + When enabled, GET or PUT requests with a + resumepos or startpos + parameter will first seek to the requested position within the file. + This is enabled by default. + + + + +
+
+
+
+ + value + + + This parameter depends on which option is chosen + to be altered. + + + +
+
+
+ + &reftitle.returnvalues; + + 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. + + + + &reftitle.examples; + + + <function>ftp_set_option</function> example + ]]> - - - - - See also ftp_get_option. - - -
+
+
+
+
+ + &reftitle.seealso; + + + ftp_get_option + + + +
- - - - ftp_site - Sends a SITE command to the server - - - Description - - boolftp_site - resourceftp_stream - stringcmd - - - ftp_site sends the command specified by - 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. - - - - Sending a SITE command to an ftp server - + + + + ftp_site + Sends a SITE command to the server + + + &reftitle.description; + + boolftp_site + resourceftp_stream + stringcommand + + + ftp_site sends the given SITE + command 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. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + command + + + The SITE command. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.examples; + + + Sending a SITE command to an ftp server + ]]> - - - - - &return.success; - - - See Also: - ftp_raw - - - + + + + + + &reftitle.seealso; + + + ftp_raw + + + + - - - - ftp_size - Returns the size of the given file - - - Description - - intftp_size - resourceftp_stream - stringremote_file - - - ftp_size returns the size of a - remote_file in bytes. If an error occurs, or if the - given file does not exist, or is a directory, -1 is returned. Not all - servers support this feature. - - - Returns the file size on success, or -1 on error. - - - - <function>ftp_size</function> example - + + + + ftp_size + Returns the size of the given file + + + &reftitle.description; + + intftp_size + resourceftp_stream + stringremote_file + + + ftp_size returns the size of a the given file in + bytes. + + + + Not all servers support this feature. + + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + remote_file + + + The remote file. + + + + + + + + &reftitle.returnvalues; + + Returns the file size on success, or -1 on error. + + + + &reftitle.examples; + + + <function>ftp_size</function> example + ]]> - - - - - See also ftp_rawlist. - - - + + + + + + &reftitle.seealso; + + + ftp_rawlist + + + + - - - - ftp_ssl_connect - Opens an Secure SSL-FTP connection - - - Description - - resourceftp_ssl_connect - stringhost - intport - inttimeout - - - Returns a SSL-FTP stream on success or &false; on error. - - - ftp_ssl_connect opens a SSL-FTP connection to the - specified host. The port - parameter specifies an alternate port to connect to. If it's - omitted or set to zero then the default FTP port 21 will be used. - - - The timeout parameter specifies the timeout for all - subsequent network operations. If omitted, the default value is 90 - seconds. The timeout can be changed and queried at any time with - ftp_set_option and - ftp_get_option. - - - - <function>ftp_ssl_connect</function> example - + + + + ftp_ssl_connect + Opens an Secure SSL-FTP connection + + + &reftitle.description; + + resourceftp_ssl_connect + stringhost + intport + inttimeout + + + ftp_ssl_connect opens a SSL-FTP connection to the + specified host. + + + Why this function may not exist + + ftp_ssl_connect is only available if + OpenSSL support is enabled into + your version of PHP. If it's undefined and you've compiled + FTP support then this is why. For Windows you must compile your + own PHP binaries to support this function. + + + + + &reftitle.parameters; + + + + host + + + The FTP server address. This parameter shouldn't have any trailing + slashes and shouldn't be prefixed with ftp://. + + + + + port + + + This parameter specifies an alternate port to connect to. If it is + omitted or set to zero, then the default FTP port, 21, will be used. + + + + + timeout + + + This parameter specifies the timeout for all subsequent network operations. + If omitted, the default value is 90 seconds. The timeout can be changed and + queried at any time with ftp_set_option and + ftp_get_option. + + + + + + + + &reftitle.returnvalues; + + Returns a SSL-FTP stream on success or &false; on error. + + + + &reftitle.examples; + + + <function>ftp_ssl_connect</function> example + ]]> - - - - - Why this function may not exist - - ftp_ssl_connect is only available if - OpenSSL support is enabled into - your version of PHP. If it's undefined and you've compiled - FTP support then this is why. For Windows you must compile your - own PHP binaries to support this function. - - - - See also ftp_connect. - - - + + + + + + &reftitle.seealso; + + + ftp_connect + + + + - - - - ftp_systype - Returns the system type identifier of the remote FTP server - - - Description - - stringftp_systype - resourceftp_stream - - - Returns the remote system type, or &false; on error. - - - - <function>ftp_systype</function> example - + + + + ftp_systype + Returns the system type identifier of the remote FTP server + + + &reftitle.description; + + stringftp_systype + resourceftp_stream + + + Returns the system type identifier of the remove FTP server. + + + + &reftitle.parameters; + + + + ftp_stream + + + The link identifier of the FTP connection. + + + + + + + + &reftitle.returnvalues; + + Returns the remote system type, or &false; on error. + + + + &reftitle.examples; + + + <function>ftp_systype</function> example + ]]> - - &example.outputs.similar; - + + &example.outputs.similar; + - - - - - + + + + +