reference/ftp/functions/ftp-pasv.xml
4d1c34c9b7a30cfc3a59641122c707a2812cfed7
...
...
@@ -9,8 +9,8 @@
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
11
<type>bool</type><methodname>ftp_pasv</methodname>
12
-
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
13
-
<methodparam><type>bool</type><parameter>pasv</parameter></methodparam>
12
+
<methodparam><type>FTP\Connection</type><parameter>ftp</parameter></methodparam>
13
+
<methodparam><type>bool</type><parameter>enable</parameter></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
16
<function>ftp_pasv</function> turns on or off passive mode. In
...
...
@@ -20,7 +20,7 @@
20
20
</para>
21
21
<para>
22
22
Please note that <function>ftp_pasv</function> can only be called after a
23
-
successfull login or otherwise it will fail.
23
+
successful login or otherwise it will fail.
24
24
</para>
25
25
</refsect1>
26
26
<refsect1 role="parameters">
...
...
@@ -28,15 +28,13 @@
28
28
<para>
29
29
<variablelist>
30
30
<varlistentry>
31
-
<term><parameter>ftp_stream</parameter></term>
31
+
<term><parameter>ftp</parameter></term>
32
32
<listitem>
33
-
<para>
34
-
The link identifier of the FTP connection.
35
-
</para>
33
+
&ftp.parameter.ftp;
36
34
</listitem>
37
35
</varlistentry>
38
36
<varlistentry>
39
-
<term><parameter>pasv</parameter></term>
37
+
<term><parameter>enable</parameter></term>
40
38
<listitem>
41
39
<para>
42
40
If &true;, the passive mode is turned on, else it's turned off.
...
...
@@ -52,6 +50,24 @@
52
50
&return.success;
53
51
</para>
54
52
</refsect1>
53
+

54
+
<refsect1 role="changelog">
55
+
&reftitle.changelog;
56
+
<informaltable>
57
+
<tgroup cols="2">
58
+
<thead>
59
+
<row>
60
+
<entry>&Version;</entry>
61
+
<entry>&Description;</entry>
62
+
</row>
63
+
</thead>
64
+
<tbody>
65
+
&ftp.changelog.ftp-param;
66
+
</tbody>
67
+
</tgroup>
68
+
</informaltable>
69
+
</refsect1>
70
+
55
71
<refsect1 role="examples">
56
72
&reftitle.examples;
57
73
<para>
...
...
@@ -64,23 +80,23 @@ $file = 'somefile.txt';
64
80
$remote_file = 'readme.txt';
65
81

66
82
// set up basic connection
67
-
$conn_id = ftp_connect($ftp_server);
83
+
$ftp = ftp_connect($ftp_server);
68
84

69
85
// login with username and password
70
-
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
86
+
$login_result = ftp_login($ftp, $ftp_user_name, $ftp_user_pass);
71
87

72
88
// turn passive mode on
73
-
ftp_pasv($conn_id, true);
89
+
ftp_pasv($ftp, true);
74
90

75
91
// upload a file
76
-
if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) {
92
+
if (ftp_put($ftp, $remote_file, $file, FTP_ASCII)) {
77
93
echo "successfully uploaded $file\n";
78
94
} else {
79
95
echo "There was a problem while uploading $file\n";
80
96
}
81
97

82
98
// close the connection
83
-
ftp_close($conn_id);
99
+
ftp_close($ftp);
84
100
?>
85
101
]]>
86
102
</programlisting>
...
...
@@ -88,7 +104,6 @@ ftp_close($conn_id);
88
104
</para>
89
105
</refsect1>
90
106
</refentry>
91
-

92
107
<!-- Keep this comment at the end of the file
93
108
Local variables:
94
109
mode: sgml
95
110