reference/ftp/functions/ftp-site.xml
4d1c34c9b7a30cfc3a59641122c707a2812cfed7
...
...
@@ -9,7 +9,7 @@
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
11
<type>bool</type><methodname>ftp_site</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>command</parameter></methodparam>
14
14
</methodsynopsis>
15
15
<para>
...
...
@@ -27,11 +27,9 @@
27
27
<para>
28
28
<variablelist>
29
29
<varlistentry>
30
-
<term><parameter>ftp_stream</parameter></term>
30
+
<term><parameter>ftp</parameter></term>
31
31
<listitem>
32
-
<para>
33
-
The link identifier of the FTP connection.
34
-
</para>
32
+
&ftp.parameter.ftp;
35
33
</listitem>
36
34
</varlistentry>
37
35
<varlistentry>
...
...
@@ -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>
...
...
@@ -61,14 +77,14 @@
61
77
<![CDATA[
62
78
<?php
63
79
// Connect to FTP server
64
-
$conn = ftp_connect('ftp.example.com');
65
-
if (!$conn) die('Unable to connect to ftp.example.com');
80
+
$ftp = ftp_connect('ftp.example.com');
81
+
if (!$ftp) die('Unable to connect to ftp.example.com');
66
82

67
83
// Login as "user" with password "pass"
68
-
if (!ftp_login($conn, 'user', 'pass')) die('Error logging into ftp.example.com');
84
+
if (!ftp_login($ftp, 'user', 'pass')) die('Error logging into ftp.example.com');
69
85

70
86
// Issue: "SITE CHMOD 0600 /home/user/privatefile" command to ftp server
71
-
if (ftp_site($conn, 'CHMOD 0600 /home/user/privatefile')) {
87
+
if (ftp_site($ftp, 'CHMOD 0600 /home/user/privatefile')) {
72
88
echo "Command executed successfully.\n";
73
89
} else {
74
90
die('Command failed.');
...
...
@@ -88,7 +104,6 @@ if (ftp_site($conn, 'CHMOD 0600 /home/user/privatefile')) {
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