-
Notifications
You must be signed in to change notification settings - Fork 102
/
ftp.xml
153 lines (144 loc) · 4.63 KB
/
ftp.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 8bc832a464e33122e8129f5a623bd845b69fa7e0 Maintainer: daijie Status: ready -->
<refentry xml:id="wrappers.ftp" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" annotations="verify_info:false" role="stream_wrapper">
<refnamediv>
<refname>ftp://</refname>
<refname>ftps://</refname>
<refpurpose>访问 FTP(s) URLs</refpurpose>
</refnamediv>
<refsect1 role="description"><!-- {{{ -->
&reftitle.description;
<para>
允许通过 FTP 读取存在的文件,以及创建新文件。
如果服务器不支持被动(passive)模式的 FTP,连接会失败。
</para>
<simpara>
打开文件后你既可以读也可以写,但是不能同时进行。
当远程文件已经存在于 ftp 服务器上,如果尝试打开并写入文件的时候,
未指定上下文(context)选项 <literal>overwrite</literal>,连接会失败。
如果要通过 FTP 覆盖存在的文件,
指定上下文(context)的 <literal>overwrite</literal> 选项来打开、写入。
另外可使用 <link linkend="ref.ftp">FTP 扩展</link>来代替。
</simpara>
<simpara>
如果你设置了 &php.ini; 中的 <link linkend="ini.from">from</link> 指令,
这个值会作为匿名(anonymous)ftp 的密码。
</simpara>
</refsect1><!-- }}} -->
<refsect1 role="usage"> <!-- {{{ -->
&reftitle.usage;
<itemizedlist>
<listitem><simpara><filename>ftp://example.com/pub/file.txt</filename></simpara></listitem>
<listitem><simpara><filename>ftp://user:password@example.com/pub/file.txt</filename></simpara></listitem>
<listitem><simpara><filename>ftps://example.com/pub/file.txt</filename></simpara></listitem>
<listitem><simpara><filename>ftps://user:password@example.com/pub/file.txt</filename></simpara></listitem>
</itemizedlist>
</refsect1> <!-- }}} -->
<refsect1 role="options"><!-- {{{ -->
&reftitle.options;
<para>
<table>
<title>封装协议概要</title>
<tgroup cols="2">
<thead>
<row>
<entry>属性</entry>
<entry>是否支持</entry>
</row>
</thead>
<tbody>
<row>
<entry>受 <link linkend="ini.allow-url-fopen">allow_url_fopen</link> 影响</entry>
<entry>是</entry>
</row>
<row>
<entry>允许读取</entry>
<entry>是</entry>
</row>
<row>
<entry>允许写入</entry>
<entry>是 (新文件/启用 <parameter>overwrite</parameter> 后已存在的文件)</entry>
</row>
<row>
<entry>允许添加</entry>
<entry>是</entry>
</row>
<row>
<entry>允许同时读和写</entry>
<entry>否</entry>
</row>
<row>
<entry>支持 <function>stat</function></entry>
<entry>
仅 <function>filesize</function>、<function>filemtime</function>、
<function>filetype</function>、 <function>file_exists</function>、
<function>is_file</function> 和 <function>is_dir</function>。
</entry>
</row>
<row>
<entry>支持 <function>unlink</function></entry>
<entry>是</entry>
</row>
<row>
<entry>支持 <function>rename</function></entry>
<entry>是</entry>
</row>
<row>
<entry>支持 <function>mkdir</function></entry>
<entry>是</entry>
</row>
<row>
<entry>支持 <function>rmdir</function></entry>
<entry>是</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</refsect1> <!-- }}} -->
<refsect1 role="notes"><!-- {{{ -->
&reftitle.notes;
<note>
<para>
FTPS 仅在 <link linkend="book.openssl">openssl</link> 扩展开启时有效。
</para>
<simpara>
如果服务器不支持 SSL,这个连接会降级(falls back)到普通未加密的 ftp。
</simpara>
</note>
<note>
<title>追加</title>
<simpara>
文件可以通过
<literal>ftp://</literal> URL 封装器来追加(append)。
</simpara>
</note>
</refsect1><!-- }}} -->
<refsect1 role="seealso"><!-- {{{ -->
&reftitle.seealso;
<simplelist>
<member><xref linkend="context.ftp" /></member>
</simplelist>
</refsect1><!-- }}} -->
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->