reference/ftp/functions/ftp-login.xml
74044699193e067dfe9c642dc393f03ebca27f83
...
...
@@ -9,12 +9,12 @@
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
11
<type>bool</type><methodname>ftp_login</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>string</type><parameter>username</parameter></methodparam>
14
14
<methodparam><type>string</type><parameter>password</parameter></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
-
Logs in to the given FTP stream.
17
+
Logs in to the given FTP connection.
18
18
</para>
19
19
</refsect1>
20
20
<refsect1 role="parameters">
...
...
@@ -22,11 +22,9 @@
22
22
<para>
23
23
<variablelist>
24
24
<varlistentry>
25
-
<term><parameter>ftp_stream</parameter></term>
25
+
<term><parameter>ftp</parameter></term>
26
26
<listitem>
27
-
<para>
28
-
The link identifier of the FTP connection.
29
-
</para>
27
+
&ftp.parameter.ftp;
30
28
</listitem>
31
29
</varlistentry>
32
30
<varlistentry>
...
...
@@ -55,6 +53,24 @@
55
53
If login fails, PHP will also throw a warning.
56
54
</para>
57
55
</refsect1>
56
+

57
+
<refsect1 role="changelog">
58
+
&reftitle.changelog;
59
+
<informaltable>
60
+
<tgroup cols="2">
61
+
<thead>
62
+
<row>
63
+
<entry>&Version;</entry>
64
+
<entry>&Description;</entry>
65
+
</row>
66
+
</thead>
67
+
<tbody>
68
+
&ftp.changelog.ftp-param;
69
+
</tbody>
70
+
</tgroup>
71
+
</informaltable>
72
+
</refsect1>
73
+
58
74
<refsect1 role="examples">
59
75
&reftitle.examples;
60
76
<para>
...
...
@@ -69,17 +85,17 @@ $ftp_user = "foo";
69
85
$ftp_pass = "bar";
70
86

71
87
// set up a connection or die
72
-
$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");
88
+
$ftp = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");
73
89

74
90
// try to login
75
-
if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) {
91
+
if (@ftp_login($ftp, $ftp_user, $ftp_pass)) {
76
92
echo "Connected as $ftp_user@$ftp_server\n";
77
93
} else {
78
94
echo "Couldn't connect as $ftp_user\n";
79
95
}
80
96

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

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