mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Swith ref.zip to the new structure
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@177332 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
661724ec0d
commit
aa38e693e3
34 changed files with 2689 additions and 1298 deletions
|
@ -1,39 +1,78 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry id="function.ftp-alloc">
|
||||
<refnamediv>
|
||||
<refname>ftp_alloc</refname>
|
||||
<refpurpose>Allocates space for a file to be uploaded</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_alloc</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>filesize</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter role="reference">result</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Sends an ALLO command to the remote FTP server to allocate <parameter>filesize</parameter>
|
||||
bytes of space. Returns &true; on success, or &false; on failure.
|
||||
</simpara>
|
||||
<note>
|
||||
<simpara>
|
||||
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.
|
||||
</simpara>
|
||||
</note>
|
||||
<simpara>
|
||||
A textual representation of the servers response will be returned by reference in
|
||||
<parameter>result</parameter> is a variable is provided.
|
||||
</simpara>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_alloc</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry id="function.ftp-alloc">
|
||||
<refnamediv>
|
||||
<refname>ftp_alloc</refname>
|
||||
<refpurpose>Allocates space for a file to be uploaded</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_alloc</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>filesize</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter role="reference">result</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sends an <literal>ALLO</literal> command to the remote FTP server to
|
||||
allocate space for a file to be uploaded.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>filezise</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of bytes to allocate.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>return</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A textual representation of the servers response will be returned by
|
||||
reference in <parameter>result</parameter> if a variable is provided.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_alloc</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -54,16 +93,20 @@ ftp_close($conn_id);
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>ftp_put</function>, and
|
||||
<function>ftp_fput</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_put</function></member>
|
||||
<member><function>ftp_fput</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,24 +1,47 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- split from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-cdup">
|
||||
<refnamediv>
|
||||
<refname>ftp_cdup</refname>
|
||||
<refpurpose>Changes to the parent directory</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_cdup</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Changes to the parent directory.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_cdup</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<refentry id="function.ftp-cdup">
|
||||
<refnamediv>
|
||||
<refname>ftp_cdup</refname>
|
||||
<refpurpose>Changes to the parent directory</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_cdup</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Changes to the parent directory.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_cdup</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// set up basic connection
|
||||
|
@ -44,17 +67,20 @@ echo ftp_pwd($conn_id); // /
|
|||
ftp_close($conn_id);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ftp_chdir</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_chdir</function></member>
|
||||
<member><function>ftp_pwd</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,28 +1,57 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-chdir">
|
||||
<refnamediv>
|
||||
<refname>ftp_chdir</refname>
|
||||
<refpurpose>Changes directories on a FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_chdir</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Changes the current directory to the specified <parameter>directory</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
&return.success;
|
||||
If changing directory fails, PHP will also throw a warning.
|
||||
</para>
|
||||
<example>
|
||||
<title><function>ftp_chdir</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry id="function.ftp-chdir">
|
||||
<refnamediv>
|
||||
<refname>ftp_chdir</refname>
|
||||
<refpurpose>Changes the current directory on a FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_chdir</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Changes the current directory to the specified one.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>directory</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The target directory.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
If changing directory fails, PHP will also throw a warning.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_chdir</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -50,13 +79,20 @@ if (ftp_chdir($conn_id, "somedir")) {
|
|||
ftp_close($conn_id);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
See also <function>ftp_cdup</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_cdup</function></member>
|
||||
<member><function>ftp_pwd</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,30 +1,66 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry id="function.ftp-chmod">
|
||||
<refnamediv>
|
||||
<refname>ftp_chmod</refname>
|
||||
<refpurpose>Set permissions on a file via FTP</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_chmod</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets the permissions on the remote file specified by
|
||||
<parameter>filename</parameter> to <parameter>mode</parameter>
|
||||
given as an <emphasis>octal</emphasis> value.
|
||||
</para>
|
||||
<para>
|
||||
Returns <parameter>mode</parameter> on success, or &false; on failure.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_chmod</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry id="function.ftp-chmod">
|
||||
<refnamediv>
|
||||
<refname>ftp_chmod</refname>
|
||||
<refpurpose>Set permissions on a file via FTP</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_chmod</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets the permissions on the specified remote file to
|
||||
<parameter>mode</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The new permissions, given as an <emphasis>octal</emphasis> value.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>filename</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The remote file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the new file permissions on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_chmod</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$file = 'public_html/index.php';
|
||||
|
@ -46,17 +82,19 @@ if (ftp_chmod($conn_id, 0644, $file) !== false) {
|
|||
ftp_close($conn_id);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
Returns the new file permissions on success or &false; on error.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>chmod</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>chmod</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,30 +1,54 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.34 -->
|
||||
<refentry id="function.ftp-close">
|
||||
<refnamediv>
|
||||
<refname>ftp_close</refname>
|
||||
<refpurpose>Closes an FTP connection</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_close</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_close</function> closes <parameter>ftp_stream</parameter>
|
||||
and releases the <type>resource</type>. After calling this function,
|
||||
you can no longer use the FTP connection and must create a new one
|
||||
with <function>ftp_connect</function>.
|
||||
</para>
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_close</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<refentry id="function.ftp-close">
|
||||
<refnamediv>
|
||||
<refname>ftp_close</refname>
|
||||
<refpurpose>Closes an FTP connection</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_close</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_close</function> closes the given link identifier
|
||||
and releases the <type>resource</type>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
After calling this function, you can no longer use the FTP connection and
|
||||
must create a new one with <function>ftp_connect</function>.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_close</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -41,14 +65,19 @@ echo ftp_pwd($conn_id); // /
|
|||
ftp_close($conn_id);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<simpara>
|
||||
See also <function>ftp_connect</function>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_connect</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,45 +1,71 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-connect">
|
||||
<refnamediv>
|
||||
<refname>ftp_connect</refname>
|
||||
<refpurpose>Opens an FTP connection</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>ftp_connect</methodname>
|
||||
<methodparam><type>string</type><parameter>host</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>timeout</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a FTP stream on success or &false; on error.
|
||||
</para>
|
||||
<para>
|
||||
<function>ftp_connect</function> opens an FTP connection to the
|
||||
specified <parameter>host</parameter>. <parameter>host</parameter>
|
||||
shouldn't have any trailing slashes and shouldn't be prefixed with
|
||||
<literal>ftp://</literal>. The <parameter>port</parameter>
|
||||
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.
|
||||
</para>
|
||||
<para>
|
||||
The <parameter>timeout</parameter> 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
|
||||
<function>ftp_set_option</function> and
|
||||
<function>ftp_get_option</function>.
|
||||
<note>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<refentry id="function.ftp-connect">
|
||||
<refnamediv>
|
||||
<refname>ftp_connect</refname>
|
||||
<refpurpose>Opens an FTP connection</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>ftp_connect</methodname>
|
||||
<methodparam><type>string</type><parameter>host</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>timeout</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_connect</function> opens an FTP connection to the
|
||||
specified <parameter>host</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The <parameter>timeout</parameter> 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 <literal>ftp://</literal>.
|
||||
</para>
|
||||
</note>
|
||||
</para>
|
||||
<example>
|
||||
<title><function>ftp_connect</function> example</title>
|
||||
<programlisting role="php">
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>timeout</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
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 <function>ftp_set_option</function> and
|
||||
<function>ftp_get_option</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a FTP stream on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_connect</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -50,14 +76,43 @@ $conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
See also <function>ftp_close</function>, and
|
||||
<function>ftp_ssl_connect</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>4.2.0</entry>
|
||||
<entry>
|
||||
<parameter>timeout</parameter> was added.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_close</function></member>
|
||||
<member><function>ftp_ssl_connect</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,26 +1,57 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-delete">
|
||||
<refnamediv>
|
||||
<refname>ftp_delete</refname>
|
||||
<refpurpose>Deletes a file on the FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_delete</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_delete</function> deletes the file specified by
|
||||
<parameter>path</parameter> from the FTP server.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_delete</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry id="function.ftp-delete">
|
||||
<refnamediv>
|
||||
<refname>ftp_delete</refname>
|
||||
<refpurpose>Deletes a file on the FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_delete</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_delete</function> deletes the file specified by
|
||||
<parameter>path</parameter> from the FTP server.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file to delete.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_delete</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$file = 'public_html/old.txt';
|
||||
|
@ -42,14 +73,11 @@ if (ftp_delete($conn_id, $file)) {
|
|||
ftp_close($conn_id);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,27 +1,58 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.32 -->
|
||||
<refentry id='function.ftp-exec'>
|
||||
<refnamediv>
|
||||
<refname>ftp_exec</refname>
|
||||
<refpurpose>Requests execution of a program on the FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_exec</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>command</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sends a SITE EXEC <parameter>command</parameter> request to the FTP
|
||||
server. Returns &true; if the command was successful (server sent response code:
|
||||
<literal>200</literal>); otherwise returns &false;.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_exec</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<refentry id='function.ftp-exec'>
|
||||
<refnamediv>
|
||||
<refname>ftp_exec</refname>
|
||||
<refpurpose>Requests execution of a program on the FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_exec</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>command</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sends a SITE EXEC <parameter>command</parameter> request to the FTP
|
||||
server.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>command</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The command to execute.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true; if the command was successful (server sent response code:
|
||||
<literal>200</literal>); otherwise returns &false;.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_exec</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -39,14 +70,19 @@ if (ftp_exec($conn_id, $command)) {
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ftp_raw</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_raw</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,32 +1,83 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-fget">
|
||||
<refnamediv>
|
||||
<refname>ftp_fget</refname>
|
||||
<refpurpose>Downloads a file from the FTP server and saves to an open file</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_fget</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>resumepos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_fget</function> retrieves <parameter>remote_file</parameter>
|
||||
from the FTP server, and writes it to the given file pointer,
|
||||
<parameter>handle</parameter>. The transfer <parameter>mode</parameter>
|
||||
specified must be either <constant>FTP_ASCII</constant> or
|
||||
<constant>FTP_BINARY</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_fget</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry id="function.ftp-fget">
|
||||
<refnamediv>
|
||||
<refname>ftp_fget</refname>
|
||||
<refpurpose>Downloads a file from the FTP server and saves to an open file</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_fget</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>resumepos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_fget</function> retrieves <parameter>remote_file</parameter>
|
||||
from the FTP server, and writes it to the given file pointer.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>handle</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An open file pointer in which we store the data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>remote_file</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The remote file path.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The transfer mode. Must be either <constant>FTP_ASCII</constant> or
|
||||
<constant>FTP_BINARY</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>resumepos</parameter></term>
|
||||
<listitem>
|
||||
<para></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_fget</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -52,23 +103,44 @@ ftp_close($conn_id);
|
|||
fclose($fp);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The <parameter>resumepos</parameter> parameter was added in PHP 4.3.0.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ftp_get</function>, <function>ftp_nb_get</function> and
|
||||
<function>ftp_nb_fget</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>4.3.0</entry>
|
||||
<entry>
|
||||
<parameter>resumepos</parameter> was added.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_get</function></member>
|
||||
<member><function>ftp_nb_get</function></member>
|
||||
<member><function>ftp_nb_fget</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,32 +1,83 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-fput">
|
||||
<refnamediv>
|
||||
<refname>ftp_fput</refname>
|
||||
<refpurpose>Uploads from an open file to the FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_fput</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>startpos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_fput</function> uploads the data from the file pointer
|
||||
<parameter>handle</parameter> until the end of the file is reached. The results are stored
|
||||
in <parameter>remote_file</parameter> on the FTP server. The transfer
|
||||
<parameter>mode</parameter> specified must be either
|
||||
<constant>FTP_ASCII</constant> or <constant>FTP_BINARY</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_fput</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<refentry id="function.ftp-fput">
|
||||
<refnamediv>
|
||||
<refname>ftp_fput</refname>
|
||||
<refpurpose>Uploads from an open file to the FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_fput</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>startpos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_fput</function> uploads the data from a file pointer
|
||||
to a remote file on the FTP server.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>remote_file</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The remote file path.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>handle</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An open file pointer on the local file. Reading stops at end of file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The transfer mode. Must be either <constant>FTP_ASCII</constant> or
|
||||
<constant>FTP_BINARY</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>startpos</parameter></term>
|
||||
<listitem>
|
||||
<para></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_fput</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -53,23 +104,44 @@ fclose($fp);
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The <parameter>startpos</parameter> parameter was added in PHP 4.3.0.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ftp_put</function>, <function>ftp_nb_fput</function>,
|
||||
and <function>ftp_nb_put</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>4.3.0</entry>
|
||||
<entry>
|
||||
<parameter>startpos</parameter> was added.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_put</function></member>
|
||||
<member><function>ftp_nb_fput</function></member>
|
||||
<member><function>ftp_nb_put</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,57 +1,91 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.30 -->
|
||||
<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>
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>ftp_get_option</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>option</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the value on success or &false; if the given
|
||||
<parameter>option</parameter> is not supported. In the latter case, a
|
||||
warning message is also thrown.
|
||||
</para>
|
||||
<para>
|
||||
This function returns the value 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>FTP_TIMEOUT_SEC</entry>
|
||||
<entry>
|
||||
Returns the current timeout used for network related operations.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
<example>
|
||||
<title><function>ftp_get_option</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<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 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>ftp_get_option</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>option</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function returns the value for the requested
|
||||
<parameter>option</parameter> from the specified FTP connection.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>option</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Currently, the following options are supported:
|
||||
<table>
|
||||
<title>Supported runtime FTP options</title>
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><constant>FTP_TIMEOUT_SEC</constant></entry>
|
||||
<entry>
|
||||
Returns the current timeout used for network related operations.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the value on success or &false; if the given
|
||||
<parameter>option</parameter> is not supported. In the latter case, a
|
||||
warning message is also thrown.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_get_option</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// Get the timeout of the given FTP stream
|
||||
$timeout = ftp_get_option($conn_id, FTP_TIMEOUT_SEC);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
See also <function>ftp_set_option</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_set_option</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,40 +1,83 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-get">
|
||||
<refnamediv>
|
||||
<refname>ftp_get</refname>
|
||||
<refpurpose>Downloads a file from the FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_get</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>local_file</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>resumepos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_get</function> retrieves <parameter>remote_file</parameter>
|
||||
from the FTP server, and saves it to <parameter>local_file</parameter>
|
||||
locally. The transfer <parameter>mode</parameter> specified must
|
||||
be either <constant>FTP_ASCII</constant> or
|
||||
<constant>FTP_BINARY</constant>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The <parameter>resumepos</parameter> parameter was added in PHP 4.3.0.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_get</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry id="function.ftp-get">
|
||||
<refnamediv>
|
||||
<refname>ftp_get</refname>
|
||||
<refpurpose>Downloads a file from the FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_get</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>local_file</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>resumepos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_get</function> retrieves a remote file from the FTP server,
|
||||
and saves it into a local file.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>local_file</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The local file path.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>remote_file</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The remote file path.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The transfer mode. Must be either <constant>FTP_ASCII</constant> or
|
||||
<constant>FTP_BINARY</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>resumepos</parameter></term>
|
||||
<listitem>
|
||||
<para></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_get</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -60,15 +103,44 @@ ftp_close($conn_id);
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ftp_fget</function>, <function>ftp_nb_get</function> and
|
||||
<function>ftp_nb_fget</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>4.3.0</entry>
|
||||
<entry>
|
||||
<parameter>resumepos</parameter> was added.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_fget</function></member>
|
||||
<member><function>ftp_nb_get</function></member>
|
||||
<member><function>ftp_nb_fget</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,29 +1,66 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-login">
|
||||
<refnamediv>
|
||||
<refname>ftp_login</refname>
|
||||
<refpurpose>Logs in to an FTP connection</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_login</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>username</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>password</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Logs in to the given FTP stream.
|
||||
</para>
|
||||
<para>
|
||||
&return.success;
|
||||
If login fails, PHP will also throw a warning.
|
||||
</para>
|
||||
<example>
|
||||
<title><function>ftp_login</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<refentry id="function.ftp-login">
|
||||
<refnamediv>
|
||||
<refname>ftp_login</refname>
|
||||
<refpurpose>Logs in to an FTP connection</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_login</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>username</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>password</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Logs in to the given FTP stream.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>username</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The username (<literal>USER</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>password</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The password (<literal>PASS</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
If login fails, PHP will also throw a warning.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_login</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -45,10 +82,11 @@ if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) {
|
|||
ftp_close($conn_id);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,30 +1,68 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-mdtm">
|
||||
<refnamediv>
|
||||
<refname>ftp_mdtm</refname>
|
||||
<refpurpose>Returns the last modified time of the given file</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_mdtm</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_mdtm</function> 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.
|
||||
</para>
|
||||
<para>
|
||||
Returns a Unix timestamp on success, or -1 on error.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_mdtm</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry id="function.ftp-mdtm">
|
||||
<refnamediv>
|
||||
<refname>ftp_mdtm</refname>
|
||||
<refpurpose>Returns the last modified time of the given file</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_mdtm</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_mdtm</function> gets the last modified time for a remote
|
||||
file.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Not all servers support this feature!
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<para>
|
||||
<function>ftp_mdtm</function> does not work with directories.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>remote_file</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file from which to extract the last modification time.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the last modified time as a Unix timestamp on success, or -1 on
|
||||
error.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_mdtm</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -51,21 +89,11 @@ ftp_close($conn_id);
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Not all servers support this feature!
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<para>
|
||||
<function>ftp_mdtm</function> does not work with directories.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,28 +1,56 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-mkdir">
|
||||
<refnamediv>
|
||||
<refname>ftp_mkdir</refname>
|
||||
<refpurpose>Creates a directory</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>ftp_mkdir</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Creates the specified <parameter>directory</parameter> on the FTP server.
|
||||
</para>
|
||||
<para>
|
||||
Returns the newly created directory name on success or &false; on error.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_mkdir</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<refentry id="function.ftp-mkdir">
|
||||
<refnamediv>
|
||||
<refname>ftp_mkdir</refname>
|
||||
<refpurpose>Creates a directory</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>ftp_mkdir</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Creates the specified <parameter>directory</parameter> on the FTP server.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>directory</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the directory that will be created.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the newly created directory name on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_mkdir</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -45,14 +73,19 @@ if (ftp_mkdir($conn_id, $dir)) {
|
|||
ftp_close($conn_id);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ftp_rmdir</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_rmdir</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,23 +1,48 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry id="function.ftp-nb-continue">
|
||||
<refnamediv>
|
||||
<refname>ftp_nb_continue</refname>
|
||||
<refpurpose>Continues retrieving/sending a file (non-blocking)</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_nb_continue</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Continues retrieving/sending a file non-blocking.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_nb_continue</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry id="function.ftp-nb-continue">
|
||||
<refnamediv>
|
||||
<refname>ftp_nb_continue</refname>
|
||||
<refpurpose>Continues retrieving/sending a file (non-blocking)</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_nb_continue</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Continues retrieving/sending a file non-blocking.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns <constant>FTP_FAILED</constant> or <constant>FTP_FINISHED</constant>
|
||||
or <constant>FTP_MOREDATA</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_nb_continue</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -34,15 +59,11 @@ if ($ret != FTP_FINISHED) {
|
|||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
Returns <constant>FTP_FAILED</constant> or <constant>FTP_FINISHED</constant>
|
||||
or <constant>FTP_MOREDATA</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,34 +1,89 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<refentry id="function.ftp-nb-fget">
|
||||
<refnamediv>
|
||||
<refname>ftp_nb_fget</refname>
|
||||
<refpurpose>Retrieves a file from the FTP server and writes it to an open file (non-blocking)</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_nb_fget</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>resumepos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_nb_fget</function> retrieves <parameter>remote_file</parameter>
|
||||
from the FTP server, and writes it to the given file pointer,
|
||||
<parameter>handle</parameter>. The transfer <parameter>mode</parameter>
|
||||
specified must be either <constant>FTP_ASCII</constant> or
|
||||
<constant>FTP_BINARY</constant>. The difference between this function and the
|
||||
<function>ftp_fget</function> is that this function retrieves the file
|
||||
asynchronously, so your program can perform other operations while the
|
||||
file is being downloaded.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_nb_fget</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<refentry id="function.ftp-nb-fget">
|
||||
<refnamediv>
|
||||
<refname>ftp_nb_fget</refname>
|
||||
<refpurpose>Retrieves a file from the FTP server and writes it to an open file (non-blocking)</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_nb_fget</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>resumepos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_nb_fget</function> retrieves a remote file from the FTP
|
||||
server.
|
||||
</para>
|
||||
<para>
|
||||
The difference between this function and <function>ftp_fget</function> is
|
||||
that this function retrieves the file asynchronously, so your program can
|
||||
perform other operations while the file is being downloaded.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>handle</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An open file pointer in which we store the data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>remote_file</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The remote file path.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The transfer mode. Must be either <constant>FTP_ASCII</constant> or
|
||||
<constant>FTP_BINARY</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>resumepos</parameter></term>
|
||||
<listitem>
|
||||
<para></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns <constant>FTP_FAILED</constant> or <constant>FTP_FINISHED</constant>
|
||||
or <constant>FTP_MOREDATA</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_nb_fget</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -59,20 +114,22 @@ if ($ret != FTP_FINISHED) {
|
|||
fclose($fp);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
Returns <constant>FTP_FAILED</constant>, <constant>FTP_FINISHED</constant>, or
|
||||
<constant>FTP_MOREDATA</constant>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ftp_nb_get</function>,
|
||||
<function>ftp_nb_continue</function>, <function>ftp_fget</function>, and
|
||||
<function>ftp_get</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_nb_get</function></member>
|
||||
<member><function>ftp_nb_continue</function></member>
|
||||
<member><function>ftp_fget</function></member>
|
||||
<member><function>ftp_fget</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,34 +1,89 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<refentry id="function.ftp-nb-fput">
|
||||
<refnamediv>
|
||||
<refname>ftp_nb_fput</refname>
|
||||
<refpurpose>Stores a file from an open file to the FTP server (non-blocking)</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_nb_fput</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>startpos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_nb_fput</function> uploads the data from the file pointer
|
||||
<parameter>handle</parameter> until it reaches the end of the file. The
|
||||
results are stored in <parameter>remote_file</parameter> on the FTP server.
|
||||
The transfer <parameter>mode</parameter> specified must be either
|
||||
<constant>FTP_ASCII</constant> or <constant>FTP_BINARY</constant>. The
|
||||
difference between this function and the <function>ftp_fput</function> is
|
||||
that this function uploads the file asynchronously, so your program can
|
||||
perform other operations while the file is being uploaded.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_nb_fput</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry id="function.ftp-nb-fput">
|
||||
<refnamediv>
|
||||
<refname>ftp_nb_fput</refname>
|
||||
<refpurpose>Stores a file from an open file to the FTP server (non-blocking)</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_nb_fput</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>startpos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_nb_fput</function> uploads the data from a file pointer to
|
||||
a remote file on the FTP server.
|
||||
</para>
|
||||
<para>
|
||||
The difference between this function and the <function>ftp_fput</function>
|
||||
is that this function uploads the file asynchronously, so your program can
|
||||
perform other operations while the file is being uploaded.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>remote_file</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The remote file path.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>handle</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An open file pointer on the local file. Reading stops at end of file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The transfer mode. Must be either <constant>FTP_ASCII</constant> or
|
||||
<constant>FTP_BINARY</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>startpos</parameter></term>
|
||||
<listitem>
|
||||
<para></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns <constant>FTP_FAILED</constant> or <constant>FTP_FINISHED</constant>
|
||||
or <constant>FTP_MOREDATA</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_nb_fput</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -58,20 +113,22 @@ if ($ret != FTP_FINISHED) {
|
|||
fclose($fp);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
Returns <constant>FTP_FAILED</constant>, <constant>FTP_FINISHED</constant>, or
|
||||
<constant>FTP_MOREDATA</constant>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ftp_nb_put</function>,
|
||||
<function>ftp_nb_continue</function>, <function>ftp_put</function>
|
||||
and <function>ftp_fput</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_nb_put</function></member>
|
||||
<member><function>ftp_nb_continue</function></member>
|
||||
<member><function>ftp_put</function></member>
|
||||
<member><function>ftp_fput</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,38 +1,89 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<refentry id="function.ftp-nb-get">
|
||||
<refnamediv>
|
||||
<refname>ftp_nb_get</refname>
|
||||
<refpurpose>Retrieves a file from the FTP server and writes it to a local file (non-blocking)</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_nb_get</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>local_file</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>resumepos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_nb_get</function> retrieves <parameter>remote_file</parameter>
|
||||
from the FTP server, and saves it to <parameter>local_file</parameter>
|
||||
locally. The transfer <parameter>mode</parameter> specified must
|
||||
be either <constant>FTP_ASCII</constant> or
|
||||
<constant>FTP_BINARY</constant>. The difference between this function and the
|
||||
<function>ftp_get</function> is that this function retrieves the file
|
||||
asynchronously, so your program can perform other operations while the
|
||||
file is being downloaded.
|
||||
</para>
|
||||
<para>
|
||||
Returns <constant>FTP_FAILED</constant>, <constant>FTP_FINISHED</constant>, or
|
||||
<constant>FTP_MOREDATA</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_nb_get</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry id="function.ftp-nb-get">
|
||||
<refnamediv>
|
||||
<refname>ftp_nb_get</refname>
|
||||
<refpurpose>Retrieves a file from the FTP server and writes it to a local file (non-blocking)</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_nb_get</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>local_file</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>resumepos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_nb_get</function> retrieves a remote file from the FTP server,
|
||||
and saves it into a local file.
|
||||
</para>
|
||||
<para>
|
||||
The difference between this function and <function>ftp_get</function> is that
|
||||
this function retrieves the file asynchronously, so your program can perform
|
||||
other operations while the file is being downloaded.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>local_file</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The local file path.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>remote_file</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The remote file path.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The transfer mode. Must be either <constant>FTP_ASCII</constant> or
|
||||
<constant>FTP_BINARY</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>resumepos</parameter></term>
|
||||
<listitem>
|
||||
<para></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns <constant>FTP_FAILED</constant> or <constant>FTP_FINISHED</constant>
|
||||
or <constant>FTP_MOREDATA</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_nb_get</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -52,11 +103,11 @@ if ($ret != FTP_FINISHED) {
|
|||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>Resuming a download with <function>ftp_nb_get</function></title>
|
||||
<programlisting role="php">
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>Resuming a download with <function>ftp_nb_get</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -79,14 +130,14 @@ if ($ret != FTP_FINISHED) {
|
|||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>
|
||||
Resuming a download at position 100 to a new
|
||||
file with <function>ftp_nb_get</function>
|
||||
</title>
|
||||
<programlisting role="php">
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>
|
||||
Resuming a download at position 100 to a new
|
||||
file with <function>ftp_nb_get</function>
|
||||
</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -104,23 +155,29 @@ while ($ret == FTP_MOREDATA) {
|
|||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
In the example above, <filename>"newfile"</filename> is 100 bytes smaller
|
||||
than <filename>"README"</filename> on the FTP server because we started
|
||||
reading at offset 100. If we have not have disabled
|
||||
<constant>FTP_AUTOSEEK</constant>, the first 100 bytes of
|
||||
<filename>"newfile"</filename> will be <literal>'\0'</literal>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ftp_nb_fget</function>,
|
||||
<function>ftp_nb_continue</function>,
|
||||
<function>ftp_get</function>, and <function>ftp_fget</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
In the example above, <filename>newfile</filename> is 100 bytes smaller
|
||||
than <filename>README</filename> on the FTP server because we started
|
||||
reading at offset 100. If we didn't disable
|
||||
<constant>FTP_AUTOSEEK</constant>, the first 100 bytes of
|
||||
<filename>newfile</filename> would be <literal>'\0'</literal>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_nb_fget</function></member>
|
||||
<member><function>ftp_nb_continue</function></member>
|
||||
<member><function>ftp_fget</function></member>
|
||||
<member><function>ftp_fget</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,37 +1,88 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<refentry id="function.ftp-nb-put">
|
||||
<refnamediv>
|
||||
<refname>ftp_nb_put</refname>
|
||||
<refpurpose>Stores a file on the FTP server (non-blocking)</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_nb_put</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>local_file</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>startpos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_nb_put</function> stores <parameter>local_file</parameter>
|
||||
on the FTP server, as <parameter>remote_file</parameter>. The transfer
|
||||
<parameter>mode</parameter> specified must be either
|
||||
<constant>FTP_ASCII</constant> or <constant>FTP_BINARY</constant>.
|
||||
The difference between this function and the <function>ftp_put</function>
|
||||
is that this function uploads the file asynchronously, so your program can
|
||||
perform other operations while the file is being uploaded.
|
||||
</para>
|
||||
<para>
|
||||
Returns <constant>FTP_FAILED</constant>, <constant>FTP_FINISHED</constant>, or
|
||||
<constant>FTP_MOREDATA</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_nb_put</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<refentry id="function.ftp-nb-put">
|
||||
<refnamediv>
|
||||
<refname>ftp_nb_put</refname>
|
||||
<refpurpose>Stores a file on the FTP server (non-blocking)</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_nb_put</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>local_file</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>startpos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_nb_put</function> stores a local file on the FTP server.
|
||||
</para>
|
||||
<para>
|
||||
The difference between this function and the <function>ftp_put</function>
|
||||
is that this function uploads the file asynchronously, so your program can
|
||||
perform other operations while the file is being uploaded.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>remote_file</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The remote file path.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>local_file</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The local file path.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The transfer mode. Must be either <constant>FTP_ASCII</constant> or
|
||||
<constant>FTP_BINARY</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>startpos</parameter></term>
|
||||
<listitem>
|
||||
<para></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns <constant>FTP_FAILED</constant> or <constant>FTP_FINISHED</constant>
|
||||
or <constant>FTP_MOREDATA</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_nb_put</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -51,11 +102,11 @@ if ($ret != FTP_FINISHED) {
|
|||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>Resuming an upload with <function>ftp_nb_put</function></title>
|
||||
<programlisting role="php">
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>Resuming an upload with <function>ftp_nb_put</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -79,16 +130,22 @@ if ($ret != FTP_FINISHED) {
|
|||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ftp_nb_fput</function>,
|
||||
<function>ftp_nb_continue</function>, <function>ftp_put</function>,
|
||||
and <function>ftp_fput</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_nb_fput</function></member>
|
||||
<member><function>ftp_nb_continue</function></member>
|
||||
<member><function>ftp_put</function></member>
|
||||
<member><function>ftp_fput</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,25 +1,54 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-nlist">
|
||||
<refnamediv>
|
||||
<refname>ftp_nlist</refname>
|
||||
<refpurpose>Returns a list of files in the given directory</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>ftp_nlist</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns an array of filenames from the specified directory
|
||||
on success or &false; on error.
|
||||
</para>
|
||||
<example>
|
||||
<title><function>ftp_nlist</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry id="function.ftp-nlist">
|
||||
<refnamediv>
|
||||
<refname>ftp_nlist</refname>
|
||||
<refpurpose>Returns a list of files in the given directory</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>ftp_nlist</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>directory</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The listed directory.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an array of filenames from the specified directory on success or
|
||||
&false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_nlist</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -37,9 +66,9 @@ var_dump($contents);
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(3) {
|
||||
[0]=>
|
||||
|
@ -49,13 +78,19 @@ array(3) {
|
|||
[2]=>
|
||||
string(3) "www"
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
<para>
|
||||
See also <function>ftp_rawlist</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_rawlist</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,29 +1,58 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-pasv">
|
||||
<refnamediv>
|
||||
<refname>ftp_pasv</refname>
|
||||
<refpurpose>Turns passive mode on or off</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_pasv</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>bool</type><parameter>pasv</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_pasv</function> turns on passive mode if the
|
||||
<parameter>pasv</parameter> parameter is &true;. It turns off
|
||||
passive mode if <parameter>pasv</parameter> is &false;. In
|
||||
passive mode, data connections are initiated by the client,
|
||||
rather than by the server.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_pasv</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry id="function.ftp-pasv">
|
||||
<refnamediv>
|
||||
<refname>ftp_pasv</refname>
|
||||
<refpurpose>Turns passive mode on or off</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_pasv</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>bool</type><parameter>pasv</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_pasv</function> turns on or off passive mode. In
|
||||
passive mode, data connections are initiated by the client,
|
||||
rather than by the server.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>pasv</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If &true;, the passive mode is turned on, else it's turned off.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_pasv</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$file = 'somefile.txt';
|
||||
|
@ -49,14 +78,11 @@ if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) {
|
|||
ftp_close($conn_id);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,39 +1,82 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-put">
|
||||
<refnamediv>
|
||||
<refname>ftp_put</refname>
|
||||
<refpurpose>Uploads a file to the FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_put</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>local_file</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>startpos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_put</function> stores <parameter>local_file</parameter>
|
||||
on the FTP server, as <parameter>remote_file</parameter>. The transfer
|
||||
<parameter>mode</parameter> specified must be either
|
||||
<constant>FTP_ASCII</constant> or <constant>FTP_BINARY</constant>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The <parameter>startpos</parameter> parameter was added in PHP 4.3.0.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_put</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<refentry id="function.ftp-put">
|
||||
<refnamediv>
|
||||
<refname>ftp_put</refname>
|
||||
<refpurpose>Uploads a file to the FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_put</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>local_file</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>startpos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_put</function> stores a local file on the FTP server.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>remote_file</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The remote file path.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>local_file</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The local file path.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The transfer mode. Must be either <constant>FTP_ASCII</constant> or
|
||||
<constant>FTP_BINARY</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>startpos</parameter></term>
|
||||
<listitem>
|
||||
<para></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_put</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$file = 'somefile.txt';
|
||||
|
@ -56,15 +99,44 @@ if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) {
|
|||
ftp_close($conn_id);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ftp_fput</function>, <function>ftp_nb_fput</function>,
|
||||
and <function>ftp_nb_put</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>4.3.0</entry>
|
||||
<entry>
|
||||
<parameter>startpos</parameter> was added.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_fput</function></member>
|
||||
<member><function>ftp_nb_fput</function></member>
|
||||
<member><function>ftp_nb_put</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,24 +1,46 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-pwd">
|
||||
<refnamediv>
|
||||
<refname>ftp_pwd</refname>
|
||||
<refpurpose>Returns the current directory name</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>ftp_pwd</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the current directory or &false; on error.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_pwd</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry id="function.ftp-pwd">
|
||||
<refnamediv>
|
||||
<refname>ftp_pwd</refname>
|
||||
<refpurpose>Returns the current directory name</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>ftp_pwd</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the current directory name or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_pwd</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -38,11 +60,20 @@ echo ftp_pwd($conn_id); // /public_html
|
|||
ftp_close($conn_id);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_chdir</function></member>
|
||||
<member><function>ftp_cdup</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-quit">
|
||||
<refnamediv>
|
||||
<refname>ftp_quit</refname>
|
||||
<refpurpose>Alias of <function>ftp_close</function></refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<para>
|
||||
This function is an alias of <function>ftp_close</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry id="function.ftp-quit">
|
||||
<refnamediv>
|
||||
<refname>ftp_quit</refname>
|
||||
<refpurpose>Alias of <function>ftp_close</function></refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>
|
||||
This function is an alias of <function>ftp_close</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,27 +1,58 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<refentry id="function.ftp-raw">
|
||||
<refnamediv>
|
||||
<refname>ftp_raw</refname>
|
||||
<refpurpose>Sends an arbitrary command to an FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>ftp_raw</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>command</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sends an arbitrary <parameter>command</parameter> to the FTP
|
||||
server. Returns the server's response as an array of strings.
|
||||
No parsing is performed on the response string, nor does
|
||||
<function>ftp_raw</function> determine if the command succeeded.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Using <function>ftp_raw</function> to login to an FTP server manually.</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id="function.ftp-raw">
|
||||
<refnamediv>
|
||||
<refname>ftp_raw</refname>
|
||||
<refpurpose>Sends an arbitrary command to an FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>ftp_raw</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>command</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sends an arbitrary <parameter>command</parameter> to the FTP server.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>command</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The command to execute.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the server's response as an array of strings.
|
||||
No parsing is performed on the response string, nor does
|
||||
<function>ftp_raw</function> determine if the command succeeded.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Using <function>ftp_raw</function> to login to an FTP server manually.</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fp = ftp_connect("ftp.example.com");
|
||||
|
@ -32,15 +63,19 @@ ftp_raw($fp, "USER joeblow");
|
|||
ftp_raw($fp, "PASS secret");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See Also:
|
||||
<function>ftp_exec</function>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_exec</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,34 +1,71 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-rawlist">
|
||||
<refnamediv>
|
||||
<refname>ftp_rawlist</refname>
|
||||
<refpurpose>Returns a detailed list of files in the given directory</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>ftp_rawlist</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>recursive</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_rawlist</function> 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 <function>ftp_systype</function>
|
||||
can be used to determine how the results should be interpreted.
|
||||
</para>
|
||||
<para>
|
||||
Optional parameter <parameter>recursive</parameter> is available since PHP
|
||||
4.3.0.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_rawlist</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry id="function.ftp-rawlist">
|
||||
<refnamediv>
|
||||
<refname>ftp_rawlist</refname>
|
||||
<refpurpose>Returns a detailed list of files in the given directory</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>ftp_rawlist</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>recursive</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_rawlist</function> executes the FTP
|
||||
<command>LIST</command> command, and returns the result as an array.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>directory</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The directory path.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>recursive</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If set to &true;, the issued command will be <command>LIST -R</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an array where each element corresponds to one line of text.
|
||||
</para>
|
||||
<para>
|
||||
The output is not parsed in any way. The system type identifier returned by
|
||||
<function>ftp_systype</function> can be used to determine how the results
|
||||
should be interpreted.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_rawlist</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -48,9 +85,9 @@ ftp_close($conn_id);
|
|||
var_dump($buff);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(3) {
|
||||
[0]=>
|
||||
|
@ -61,14 +98,42 @@ array(3) {
|
|||
string(73) "lrwxrwxrwx 1 vincent vincent 11 Jul 12 12:16 www -> public_html"
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ftp_nlist</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>4.3.0</entry>
|
||||
<entry>
|
||||
<parameter>recursive</parameter> was added.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_nlist</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,29 +1,66 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-rename">
|
||||
<refnamediv>
|
||||
<refname>ftp_rename</refname>
|
||||
<refpurpose>Renames a file on the FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_rename</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>from</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>to</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_rename</function> renames the file or directory that is
|
||||
currently named <parameter>from</parameter> to the new name
|
||||
<parameter>to</parameter>, using the FTP stream
|
||||
<parameter>ftp_stream</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_rename</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry id="function.ftp-rename">
|
||||
<refnamediv>
|
||||
<refname>ftp_rename</refname>
|
||||
<refpurpose>Renames a file or a directory on the FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_rename</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oldname</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>newname</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_rename</function> renames a file or a directory on the FTP
|
||||
server.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oldname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The old file/directory name.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>newname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The new name.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_rename</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$old_file = 'somefile.txt.bak';
|
||||
|
@ -46,14 +83,11 @@ if (ftp_rename($conn_id, $old_file, $new_file)) {
|
|||
ftp_close($conn_id);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,30 +1,57 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-rmdir">
|
||||
<refnamediv>
|
||||
<refname>ftp_rmdir</refname>
|
||||
<refpurpose>Removes a directory</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_rmdir</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Removes the specified <parameter>directory</parameter>.
|
||||
<parameter>directory</parameter> must be either an absolute or relative
|
||||
path to an empty directory.
|
||||
</para>
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_rmdir</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<refentry id="function.ftp-rmdir">
|
||||
<refnamediv>
|
||||
<refname>ftp_rmdir</refname>
|
||||
<refpurpose>Removes a directory</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_rmdir</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Removes the specified <parameter>directory</parameter> on the FTP server.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>directory</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The directory to delete. This must be either an absolute or relative
|
||||
path to an empty directory.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_rmdir</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -47,14 +74,19 @@ ftp_close($conn_id);
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ftp_mkdir</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_mkdir</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,70 +1,113 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.32 -->
|
||||
<refentry id='function.ftp-set-option'>
|
||||
<refnamediv>
|
||||
<refname>ftp_set_option</refname>
|
||||
<refpurpose>Set miscellaneous runtime FTP options</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_set_option</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>option</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<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 chosen to be altered.
|
||||
Currently, the following options are supported:
|
||||
<table>
|
||||
<title>Supported runtime FTP options</title>
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>FTP_TIMEOUT_SEC</entry>
|
||||
<entry>Changes the timeout in seconds used for all network related
|
||||
functions. <parameter>value</parameter> must be an integer that is greater than 0.
|
||||
The default timeout is 90 seconds.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>FTP_AUTOSEEK</entry>
|
||||
<entry>When enabled, GET or PUT requests with
|
||||
a <parameter>resumepos</parameter> or <parameter>startpos</parameter>
|
||||
parameter will first seek to the requested position within the file. This is enabled
|
||||
by default.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_set_option</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry id='function.ftp-set-option'>
|
||||
<refnamediv>
|
||||
<refname>ftp_set_option</refname>
|
||||
<refpurpose>Set miscellaneous runtime FTP options</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_set_option</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>option</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function controls various runtime options for the specified FTP
|
||||
stream.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>option</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Currently, the following options are supported:
|
||||
<table>
|
||||
<title>Supported runtime FTP options</title>
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><constant>FTP_TIMEOUT_SEC</constant></entry>
|
||||
<entry>
|
||||
Changes the timeout in seconds used for all network related
|
||||
functions. <parameter>value</parameter> must be an integer that
|
||||
is greater than 0. The default timeout is 90 seconds.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>FTP_AUTOSEEK</constant></entry>
|
||||
<entry>
|
||||
When enabled, GET or PUT requests with a
|
||||
<parameter>resumepos</parameter> or <parameter>startpos</parameter>
|
||||
parameter will first seek to the requested position within the file.
|
||||
This is enabled by default.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This parameter depends on which <parameter>option</parameter> is chosen
|
||||
to be altered.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<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>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_set_option</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// Set the network timeout to 10 seconds
|
||||
ftp_set_option($conn_id, FTP_TIMEOUT_SEC, 10);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ftp_get_option</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_get_option</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,29 +1,62 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.3 -->
|
||||
<refentry id="function.ftp-site">
|
||||
<refnamediv>
|
||||
<refname>ftp_site</refname>
|
||||
<refpurpose>Sends a SITE command to the server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_site</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>cmd</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_site</function> sends the command specified by
|
||||
<parameter>cmd</parameter> 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.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Sending a SITE command to an ftp server</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<refentry id="function.ftp-site">
|
||||
<refnamediv>
|
||||
<refname>ftp_site</refname>
|
||||
<refpurpose>Sends a SITE command to the server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ftp_site</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>command</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_site</function> sends the given <literal>SITE</literal>
|
||||
command to the FTP server.
|
||||
</para>
|
||||
<para>
|
||||
<literal>SITE</literal> commands are not standardized, and vary from server
|
||||
to server. They are useful for handling such things as file permissions and
|
||||
group membership.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>command</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The SITE command.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Sending a SITE command to an ftp server</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to FTP server */
|
||||
|
@ -41,18 +74,19 @@ if (ftp_site($conn, 'CHMOD 0600 /home/user/privatefile')) {
|
|||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
<simpara>
|
||||
See Also:
|
||||
<function>ftp_raw</function>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_raw</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,31 +1,62 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-size">
|
||||
<refnamediv>
|
||||
<refname>ftp_size</refname>
|
||||
<refpurpose>Returns the size of the given file</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_size</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_size</function> returns the size of a
|
||||
<parameter>remote_file</parameter> 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.
|
||||
</para>
|
||||
<para>
|
||||
Returns the file size on success, or -1 on error.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_size</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry id="function.ftp-size">
|
||||
<refnamediv>
|
||||
<refname>ftp_size</refname>
|
||||
<refpurpose>Returns the size of the given file</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ftp_size</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_size</function> returns the size of a the given file in
|
||||
bytes.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Not all servers support this feature.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>remote_file</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The remote file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the file size on success, or -1 on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_size</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -51,14 +82,19 @@ ftp_close($conn_id);
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ftp_rawlist</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_rawlist</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,39 +1,81 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-ssl-connect">
|
||||
<refnamediv>
|
||||
<refname>ftp_ssl_connect</refname>
|
||||
<refpurpose>Opens an Secure SSL-FTP connection</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>ftp_ssl_connect</methodname>
|
||||
<methodparam><type>string</type><parameter>host</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>timeout</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a SSL-FTP stream on success or &false; on error.
|
||||
</para>
|
||||
<para>
|
||||
<function>ftp_ssl_connect</function> opens a SSL-FTP connection to the
|
||||
specified <parameter>host</parameter>. The <parameter>port</parameter>
|
||||
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.
|
||||
</para>
|
||||
<para>
|
||||
The <parameter>timeout</parameter> 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
|
||||
<function>ftp_set_option</function> and
|
||||
<function>ftp_get_option</function>.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_ssl_connect</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry id="function.ftp-ssl-connect">
|
||||
<refnamediv>
|
||||
<refname>ftp_ssl_connect</refname>
|
||||
<refpurpose>Opens an Secure SSL-FTP connection</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>ftp_ssl_connect</methodname>
|
||||
<methodparam><type>string</type><parameter>host</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>timeout</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ftp_ssl_connect</function> opens a SSL-FTP connection to the
|
||||
specified <parameter>host</parameter>.
|
||||
</para>
|
||||
<note>
|
||||
<title>Why this function may not exist</title>
|
||||
<para>
|
||||
<function>ftp_ssl_connect</function> is only available if
|
||||
<link linkend="ref.openssl">OpenSSL</link> 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.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The FTP server address. This parameter shouldn't have any trailing
|
||||
slashes and shouldn't be prefixed with <literal>ftp://</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>timeout</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
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 <function>ftp_set_option</function> and
|
||||
<function>ftp_get_option</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a SSL-FTP stream on success or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_ssl_connect</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -49,24 +91,19 @@ echo ftp_pwd($conn_id); // /
|
|||
ftp_close($conn_id);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<note>
|
||||
<title>Why this function may not exist</title>
|
||||
<para>
|
||||
<function>ftp_ssl_connect</function> is only available if
|
||||
<link linkend="ref.openssl">OpenSSL</link> 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.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
See also <function>ftp_connect</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ftp_connect</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,24 +1,47 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ftp-systype">
|
||||
<refnamediv>
|
||||
<refname>ftp_systype</refname>
|
||||
<refpurpose>Returns the system type identifier of the remote FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>ftp_systype</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the remote system type, or &false; on error.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_systype</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<refentry id="function.ftp-systype">
|
||||
<refnamediv>
|
||||
<refname>ftp_systype</refname>
|
||||
<refpurpose>Returns the system type identifier of the remote FTP server</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>ftp_systype</methodname>
|
||||
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the system type identifier of the remove FTP server.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ftp_stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The link identifier of the FTP connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the remote system type, or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ftp_systype</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -35,17 +58,17 @@ if ($type = ftp_systype($ftp)) {
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Example.com is powered by UNIX
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
Loading…
Reference in a new issue