mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Clarify example
Add missing option WS git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@177335 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
fb2a556169
commit
8591c89d86
5 changed files with 81 additions and 82 deletions
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<section id="ftp.installation">
|
||||
&reftitle.install;
|
||||
&reftitle.install;
|
||||
<para>
|
||||
In order to use FTP functions with your PHP configuration, you should
|
||||
add the <option role="configure">--enable-ftp</option> option when
|
||||
installing PHP 4 or <option role="configure">--with-ftp</option> when using
|
||||
PHP 3.
|
||||
PHP 3.
|
||||
</para>
|
||||
&windows.builtin;
|
||||
</section>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<section id="ftp.constants">
|
||||
&reftitle.constants;
|
||||
&extension.constants;
|
||||
|
@ -10,9 +10,7 @@
|
|||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
<para></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -21,9 +19,7 @@
|
|||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
<para></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -32,9 +28,7 @@
|
|||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
<para></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -43,9 +37,7 @@
|
|||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
<para></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -54,15 +46,15 @@
|
|||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<para>
|
||||
See <function>ftp_set_option</function> for information.
|
||||
</simpara>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<simpara>
|
||||
<para>
|
||||
The following constants were introduced in PHP 4.3.0.
|
||||
</simpara>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
|
@ -70,9 +62,9 @@
|
|||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<para>
|
||||
See <function>ftp_set_option</function> for information.
|
||||
</simpara>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -81,10 +73,10 @@
|
|||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<para>
|
||||
Automatically determine resume position and start position for GET and PUT requests
|
||||
(only works if FTP_AUTOSEEK is enabled)
|
||||
</simpara>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -93,9 +85,9 @@
|
|||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<para>
|
||||
Asynchronous transfer has failed
|
||||
</simpara>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -104,9 +96,9 @@
|
|||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<para>
|
||||
Asynchronous transfer has finished
|
||||
</simpara>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -115,9 +107,9 @@
|
|||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<para>
|
||||
Asynchronous transfer is still active
|
||||
</simpara>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<refentry id="function.ftp-fget">
|
||||
<refnamediv>
|
||||
<refname>ftp_fget</refname>
|
||||
|
@ -82,8 +82,8 @@
|
|||
<?php
|
||||
|
||||
// open some file for reading
|
||||
$file = 'somefile.txt';
|
||||
$fp = fopen($file, 'w');
|
||||
$remote_file = 'somefile.txt';
|
||||
$handle = fopen('localfile.txt', 'w');
|
||||
|
||||
// set up basic connection
|
||||
$conn_id = ftp_connect($ftp_server);
|
||||
|
@ -92,7 +92,7 @@ $conn_id = ftp_connect($ftp_server);
|
|||
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
|
||||
|
||||
// try to download $file
|
||||
if (ftp_fget($conn_id, $fp, $file, FTP_ASCII, 1)) {
|
||||
if (ftp_fget($conn_id, $handle, $remote_file, FTP_ASCII, 1)) {
|
||||
echo "successfully written to $file\n";
|
||||
} else {
|
||||
echo "There was a problem with $file\n";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<refentry id='function.ftp-get-option'>
|
||||
<refnamediv>
|
||||
<refname>ftp_get_option</refname>
|
||||
|
@ -44,6 +44,12 @@
|
|||
Returns the current timeout used for network related operations.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>FTP_AUTOSEEK</constant></entry>
|
||||
<entry>
|
||||
Returns &true; if this option is on, &false; otherwise.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
|
|
@ -1,54 +1,54 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<reference id="ref.ftp">
|
||||
<title>FTP Functions</title>
|
||||
<titleabbrev>FTP</titleabbrev>
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<reference id="ref.ftp">
|
||||
<title>FTP Functions</title>
|
||||
<titleabbrev>FTP</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
<section id="ftp.intro">
|
||||
<partintro>
|
||||
<section id="ftp.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
The functions in this extension implement client access to file
|
||||
servers speaking the File Transfer Protocol (FTP) as defined in
|
||||
<ulink url="&url.rfc;959">&url.rfc;959</ulink>. This extension is
|
||||
meant for detailed access to an FTP server providing a wide range
|
||||
of control to the executing script. If you only wish to
|
||||
read from or write to a file on an FTP server, consider using
|
||||
the <link linkend="wrappers.ftp"><literal>ftp://</literal> wrapper</link>
|
||||
with the <link linkend="ref.filesystem">filesystem functions</link>
|
||||
which provide a simpler and more intuitive interface.
|
||||
</para>
|
||||
</section>
|
||||
<para>
|
||||
The functions in this extension implement client access to file
|
||||
servers speaking the File Transfer Protocol (FTP) as defined in
|
||||
<ulink url="&url.rfc;959">&url.rfc;959</ulink>. This extension is
|
||||
meant for detailed access to an FTP server providing a wide range
|
||||
of control to the executing script. If you only wish to
|
||||
read from or write to a file on an FTP server, consider using
|
||||
the <link linkend="wrappers.ftp"><literal>ftp://</literal> wrapper</link>
|
||||
with the <link linkend="ref.filesystem">filesystem functions</link>
|
||||
which provide a simpler and more intuitive interface.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="ftp.requirements">
|
||||
&reftitle.required;
|
||||
&no.requirement;
|
||||
</section>
|
||||
<section id="ftp.requirements">
|
||||
&reftitle.required;
|
||||
&no.requirement;
|
||||
</section>
|
||||
|
||||
&reference.ftp.configure;
|
||||
&reference.ftp.configure;
|
||||
|
||||
<section id="ftp.configuration">
|
||||
<section id="ftp.configuration">
|
||||
&reftitle.runtime;
|
||||
&no.config;
|
||||
</section>
|
||||
&no.config;
|
||||
</section>
|
||||
|
||||
<section id="ftp.resources">
|
||||
<section id="ftp.resources">
|
||||
&reftitle.resources;
|
||||
<para>
|
||||
This extension uses one resource type, which is the link identifier
|
||||
of the FTP connection, returned by <function>ftp_connect</function>
|
||||
or <function>ftp_ssl_connect</function>.
|
||||
</para>
|
||||
</section>
|
||||
<para>
|
||||
This extension uses one resource type, which is the link identifier
|
||||
of the FTP connection, returned by <function>ftp_connect</function>
|
||||
or <function>ftp_ssl_connect</function>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
&reference.ftp.constants;
|
||||
&reference.ftp.constants;
|
||||
|
||||
<section id="ftp.examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>FTP example</title>
|
||||
<programlisting role="php">
|
||||
<section id="ftp.examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>FTP example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// set up basic connection
|
||||
|
@ -80,15 +80,16 @@ if (!$upload) {
|
|||
ftp_close($conn_id);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</section>
|
||||
</partintro>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</section>
|
||||
</partintro>
|
||||
|
||||
&reference.ftp.functions;
|
||||
&reference.ftp.functions;
|
||||
|
||||
</reference>
|
||||
|
||||
</reference>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
Loading…
Reference in a new issue