reference/ftp/functions/ftp-set-option.xml
4d1c34c9b7a30cfc3a59641122c707a2812cfed7
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xml:id='function.ftp-set-option' xmlns="http://docbook.org/ns/docbook">
3
+
<refentry xml:id="function.ftp-set-option" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>ftp_set_option</refname>
6
6
<refpurpose>Set miscellaneous runtime FTP options</refpurpose>
...
...
@@ -9,13 +9,12 @@
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
11
<type>bool</type><methodname>ftp_set_option</methodname>
12
-
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
12
+
<methodparam><type>FTP\Connection</type><parameter>ftp</parameter></methodparam>
13
13
<methodparam><type>int</type><parameter>option</parameter></methodparam>
14
-
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
14
+
<methodparam><type class="union"><type>int</type><type>bool</type></type><parameter>value</parameter></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
-
This function controls various runtime options for the specified FTP
18
-
stream.
17
+
This function controls various runtime options for the specified FTP connection.
19
18
</para>
20
19
</refsect1>
21
20
<refsect1 role="parameters">
...
...
@@ -23,11 +22,9 @@
23
22
<para>
24
23
<variablelist>
25
24
<varlistentry>
26
-
<term><parameter>ftp_stream</parameter></term>
25
+
<term><parameter>ftp</parameter></term>
27
26
<listitem>
28
-
<para>
29
-
The link identifier of the FTP connection.
30
-
</para>
27
+
&ftp.parameter.ftp;
31
28
</listitem>
32
29
</varlistentry>
33
30
<varlistentry>
...
...
@@ -56,6 +53,13 @@
56
53
This is enabled by default.
57
54
</entry>
58
55
</row>
56
+
<row>
57
+
<entry><constant>FTP_USEPASVADDRESS</constant></entry>
58
+
<entry>
59
+
When disabled, PHP will ignore the IP address returned by the FTP server in response to the PASV command and instead use the IP address that was supplied in the ftp_connect().
60
+
<parameter>value</parameter> must be a boolean.
61
+
</entry>
62
+
</row>
59
63
</tbody>
60
64
</tgroup>
61
65
</table>
...
...
@@ -83,6 +87,24 @@
83
87
expected value for the given <parameter>option</parameter>.
84
88
</para>
85
89
</refsect1>
90
+

91
+
<refsect1 role="changelog">
92
+
&reftitle.changelog;
93
+
<informaltable>
94
+
<tgroup cols="2">
95
+
<thead>
96
+
<row>
97
+
<entry>&Version;</entry>
98
+
<entry>&Description;</entry>
99
+
</row>
100
+
</thead>
101
+
<tbody>
102
+
&ftp.changelog.ftp-param;
103
+
</tbody>
104
+
</tgroup>
105
+
</informaltable>
106
+
</refsect1>
107
+
86
108
<refsect1 role="examples">
87
109
&reftitle.examples;
88
110
<para>
...
...
@@ -92,7 +114,7 @@
92
114
<![CDATA[
93
115
<?php
94
116
// Set the network timeout to 10 seconds
95
-
ftp_set_option($conn_id, FTP_TIMEOUT_SEC, 10);
117
+
ftp_set_option($ftp, FTP_TIMEOUT_SEC, 10);
96
118
?>
97
119
]]>
98
120
</programlisting>
...
...
@@ -108,7 +130,6 @@ ftp_set_option($conn_id, FTP_TIMEOUT_SEC, 10);
108
130
</para>
109
131
</refsect1>
110
132
</refentry>
111
-

112
133
<!-- Keep this comment at the end of the file
113
134
Local variables:
114
135
mode: sgml
115
136