- Go along with latest CVS changes.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@66742 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Markus Fischer 2002-01-03 02:43:12 +00:00
parent e9a7d7a25a
commit 0295272193

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.31 $ -->
<!-- $Revision: 1.32 $ -->
<reference id="ref.ftp">
<title>FTP functions</title>
<titleabbrev>FTP</titleabbrev>
@ -73,8 +73,8 @@ ftp_quit($conn_id);
<funcprototype>
<funcdef>resource <function>ftp_connect</function></funcdef>
<paramdef>string <parameter>host</parameter></paramdef>
<paramdef>int <parameter><optional>port</optional>
</parameter></paramdef>
<paramdef>int <parameter><optional>port</optional></paramdef></paramdef>
<paramdef>int <parameter><optional>timeout</optional></parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
@ -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.
</para>
<para>
The <parameter>timeout</parameter> 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
<function>ftp_set_option</function> and
<function>ftp_get_option</function>.
<note>
<para>
This is parameter is only available in CVS.
</para>
</note>
</para>
</refsect1>
</refentry>
@ -620,6 +632,123 @@ $upload = ftp_put($conn_id, $destination_file, $source_file, FTP_ASCII);
</refsect1>
</refentry>
<refentry id='function.ftp-set-option'>
<refnamediv>
<refname>ftp_set_option</refname>
<refpurpose>
Set miscellaneous runtime FTP options.
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>bool <function>ftp_set_option</function></funcdef>
<paramdef>resource <parameter>stream</parameter></paramdef>
<paramdef>int <parameter>option</parameter></paramdef>
<paramdef>mixed <parameter>value</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<note>
<para>
This function is only available in CVS.
</para>
</note>
<para>
Returns &true; if the option could be set; &false; if not. A warning
message will be thrown if the <parameter>option</parameter> is not
supported or the passed <parameter>value</parameter> doesn't match the
expected value for the given <parameter>option</parameter>.
</para>
<para>
This function controls various runtime options for the specified FTP
stream. The <parameter>value</parameter> parameter depends on which
<parameter>option</parameter> parameter is choosen to be altered.
Currently, the following options are supported:
<table>
<title>Supported runtime FTP options</title>
<tgroup cols="2">
<tbody>
<row>
<entry><member>FTP_TIMEOUT_SEC</member></entry>
<entry>Changes the timeout in seconds used for all network related
functions. Parameter <parameter>value</parameter> has be to of type
int and must be greater than 0. The default timeout is 90
seconds.</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
<para>
<example>
<title><function>ftp_set_option</function> example</title>
<programlisting role="php">
<![CDATA[
// Set the network timeout down to 10 seconds
ftp_set_option($conn_id, FTP_TIMEOUT_SEC, 10);
]]>
</programlistuing>
</para>
</refsect1>
</refentry>
<refentry id='function.ftp-get-option'>
<refnamediv>
<refname>ftp_get_option</refname>
<refpurpose>
Retrieves various runtime behaviours of the current FTP stream.
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>bool <function>ftp_get_option</function></funcdef>
<paramdef>resource <parameter>stream</parameter></paramdef>
<paramdef>int <parameter>option</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<note>
<para>
This function is only available in CVS.
</para>
</note>
<para>
Returns the value on success or &false; if the given
<parameter>option</parameter> is not supposed. In the latter case a
warning message is also thrown.
</para>
<para>
This function returns the <parameter>value</parameter> for the requested
<parameter>option</parameter> from the specified <parameter>FTP
stream</parameter>. Currently, the following options are supported:
<table>
<title>Supported runtime FTP options</title>
<tgroup cols="2">
<tbody>
<row>
<entry><member>FTP_TIMEOUT_SEC</member></entry>
<entry>Returns the current timeout used for network related
operations.</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
<para>
<example>
<title><function>ftp_get_option</function> example</title>
<programlisting role="php">
<![CDATA[
// Get the timeout of the given FTP stream
$timeout = ftp_get_option($conn_id, FTP_TIMEOUT_SEC);
]]>
</programlistuing>
</para>
</refsect1>
</refentry>
</reference>
<!-- Keep this comment at the end of the file
Local variables: