reference/ftp/functions/ftp-exec.xml
4d1c34c9b7a30cfc3a59641122c707a2812cfed7
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xml:id='function.ftp-exec' xmlns="http://docbook.org/ns/docbook">
3
+
<refentry xml:id="function.ftp-exec" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>ftp_exec</refname>
6
6
<refpurpose>Requests execution of a command on the FTP server</refpurpose>
...
...
@@ -9,7 +9,7 @@
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
11
<type>bool</type><methodname>ftp_exec</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>
...
...
@@ -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>
...
...
@@ -47,6 +45,24 @@
47
45
<literal>200</literal>); otherwise returns &false;.
48
46
</para>
49
47
</refsect1>
48
+

49
+
<refsect1 role="changelog">
50
+
&reftitle.changelog;
51
+
<informaltable>
52
+
<tgroup cols="2">
53
+
<thead>
54
+
<row>
55
+
<entry>&Version;</entry>
56
+
<entry>&Description;</entry>
57
+
</row>
58
+
</thead>
59
+
<tbody>
60
+
&ftp.changelog.ftp-param;
61
+
</tbody>
62
+
</tgroup>
63
+
</informaltable>
64
+
</refsect1>
65
+
50
66
<refsect1 role="examples">
51
67
&reftitle.examples;
52
68
<para>
...
...
@@ -60,20 +76,20 @@
60
76
$command = 'ls -al >files.txt';
61
77

62
78
// set up basic connection
63
-
$conn_id = ftp_connect($ftp_server);
79
+
$ftp = ftp_connect($ftp_server);
64
80

65
81
// login with username and password
66
-
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
82
+
$login_result = ftp_login($ftp, $ftp_user_name, $ftp_user_pass);
67
83

68
84
// execute command
69
-
if (ftp_exec($conn_id, $command)) {
85
+
if (ftp_exec($ftp, $command)) {
70
86
echo "$command executed successfully\n";
71
87
} else {
72
88
echo "could not execute $command\n";
73
89
}
74
90

75
91
// close the connection
76
-
ftp_close($conn_id);
92
+
ftp_close($ftp);
77
93

78
94
?>
79
95
]]>
...
...
@@ -90,7 +106,6 @@ ftp_close($conn_id);
90
106
</para>
91
107
</refsect1>
92
108
</refentry>
93
-

94
109
<!-- Keep this comment at the end of the file
95
110
Local variables:
96
111
mode: sgml
97
112