reference/ftp/functions/ftp-alloc.xml
4d1c34c9b7a30cfc3a59641122c707a2812cfed7
...
...
@@ -9,9 +9,9 @@
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
11
<type>bool</type><methodname>ftp_alloc</methodname>
12
-
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
13
-
<methodparam><type>int</type><parameter>filesize</parameter></methodparam>
14
-
<methodparam choice="opt"><type>string</type><parameter role="reference">result</parameter></methodparam>
12
+
<methodparam><type>FTP\Connection</type><parameter>ftp</parameter></methodparam>
13
+
<methodparam><type>int</type><parameter>size</parameter></methodparam>
14
+
<methodparam choice="opt"><type>string</type><parameter role="reference">response</parameter><initializer>&null;</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
Sends an <literal>ALLO</literal> command to the remote FTP server to
...
...
@@ -34,15 +34,13 @@
34
34
<para>
35
35
<variablelist>
36
36
<varlistentry>
37
-
<term><parameter>ftp_stream</parameter></term>
37
+
<term><parameter>ftp</parameter></term>
38
38
<listitem>
39
-
<para>
40
-
The link identifier of the FTP connection.
41
-
</para>
39
+
&ftp.parameter.ftp;
42
40
</listitem>
43
41
</varlistentry>
44
42
<varlistentry>
45
-
<term><parameter>filesize</parameter></term>
43
+
<term><parameter>size</parameter></term>
46
44
<listitem>
47
45
<para>
48
46
The number of bytes to allocate.
...
...
@@ -50,11 +48,11 @@
50
48
</listitem>
51
49
</varlistentry>
52
50
<varlistentry>
53
-
<term><parameter>result</parameter></term>
51
+
<term><parameter>response</parameter></term>
54
52
<listitem>
55
53
<para>
56
54
A textual representation of the servers response will be returned by
57
-
reference in <parameter>result</parameter> if a variable is provided.
55
+
reference in <parameter>response</parameter> if a variable is provided.
58
56
</para>
59
57
</listitem>
60
58
</varlistentry>
...
...
@@ -67,6 +65,24 @@
67
65
&return.success;
68
66
</para>
69
67
</refsect1>
68
+

69
+
<refsect1 role="changelog">
70
+
&reftitle.changelog;
71
+
<informaltable>
72
+
<tgroup cols="2">
73
+
<thead>
74
+
<row>
75
+
<entry>&Version;</entry>
76
+
<entry>&Description;</entry>
77
+
</row>
78
+
</thead>
79
+
<tbody>
80
+
&ftp.changelog.ftp-param;
81
+
</tbody>
82
+
</tgroup>
83
+
</informaltable>
84
+
</refsect1>
85
+
70
86
<refsect1 role="examples">
71
87
&reftitle.examples;
72
88
<para>
...
...
@@ -79,17 +95,17 @@
79
95
$file = "/home/user/myfile";
80
96

81
97
// connect to the server
82
-
$conn_id = ftp_connect('ftp.example.com');
83
-
$login_result = ftp_login($conn_id, 'anonymous', 'user@example.com');
98
+
$ftp = ftp_connect('ftp.example.com');
99
+
$login_result = ftp_login($ftp, 'anonymous', 'user@example.com');
84
100

85
-
if (ftp_alloc($conn_id, filesize($file), $result)) {
101
+
if (ftp_alloc($ftp, filesize($file), $result)) {
86
102
echo "Space successfully allocated on server. Sending $file.\n";
87
-
ftp_put($conn_id, '/incomming/myfile', $file, FTP_BINARY);
103
+
ftp_put($ftp, '/incoming/myfile', $file, FTP_BINARY);
88
104
} else {
89
105
echo "Unable to allocate space on server. Server said: $result\n";
90
106
}
91
107

92
-
ftp_close($conn_id);
108
+
ftp_close($ftp);
93
109

94
110
?>
95
111
]]>
...
...
@@ -107,7 +123,6 @@ ftp_close($conn_id);
107
123
</para>
108
124
</refsect1>
109
125
</refentry>
110
-

111
126
<!-- Keep this comment at the end of the file
112
127
Local variables:
113
128
mode: sgml
114
129