reference/ftp/functions/ftp-mkdir.xml
181e9c5572ed04ed712b8d7f858f61a94647c6ac
...
...
@@ -8,8 +8,8 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>string</type><methodname>ftp_mkdir</methodname>
12
-
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
11
+
<type class="union"><type>string</type><type>false</type></type><methodname>ftp_mkdir</methodname>
12
+
<methodparam><type>FTP\Connection</type><parameter>ftp</parameter></methodparam>
13
13
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
14
14
</methodsynopsis>
15
15
<para>
...
...
@@ -21,11 +21,9 @@
21
21
<para>
22
22
<variablelist>
23
23
<varlistentry>
24
-
<term><parameter>ftp_stream</parameter></term>
24
+
<term><parameter>ftp</parameter></term>
25
25
<listitem>
26
-
<para>
27
-
The link identifier of the FTP connection.
28
-
</para>
26
+
&ftp.parameter.ftp;
29
27
</listitem>
30
28
</varlistentry>
31
29
<varlistentry>
...
...
@@ -45,6 +43,32 @@
45
43
Returns the newly created directory name on success or &false; on error.
46
44
</para>
47
45
</refsect1>
46
+

47
+
<refsect1 role="errors">
48
+
&reftitle.errors;
49
+
<simpara>
50
+
Emits an <constant>E_WARNING</constant> level error if the directory
51
+
already exists or the relevant permissions prevent creating the directory.
52
+
</simpara>
53
+
</refsect1>
54
+

55
+
<refsect1 role="changelog">
56
+
&reftitle.changelog;
57
+
<informaltable>
58
+
<tgroup cols="2">
59
+
<thead>
60
+
<row>
61
+
<entry>&Version;</entry>
62
+
<entry>&Description;</entry>
63
+
</row>
64
+
</thead>
65
+
<tbody>
66
+
&ftp.changelog.ftp-param;
67
+
</tbody>
68
+
</tgroup>
69
+
</informaltable>
70
+
</refsect1>
71
+

48
72
<refsect1 role="examples">
49
73
&reftitle.examples;
50
74
<para>
...
...
@@ -57,20 +81,20 @@
57
81
$dir = 'www';
58
82

59
83
// set up basic connection
60
-
$conn_id = ftp_connect($ftp_server);
84
+
$ftp = ftp_connect($ftp_server);
61
85

62
86
// login with username and password
63
-
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
87
+
$login_result = ftp_login($ftp, $ftp_user_name, $ftp_user_pass);
64
88

65
89
// try to create the directory $dir
66
-
if (ftp_mkdir($conn_id, $dir)) {
90
+
if (ftp_mkdir($ftp, $dir)) {
67
91
echo "successfully created $dir\n";
68
92
} else {
69
93
echo "There was a problem while creating $dir\n";
70
94
}
71
95

72
96
// close the connection
73
-
ftp_close($conn_id);
97
+
ftp_close($ftp);
74
98
?>
75
99
]]>
76
100
</programlisting>
...
...
@@ -86,7 +110,6 @@ ftp_close($conn_id);
86
110
</para>
87
111
</refsect1>
88
112
</refentry>
89
-

90
113
<!-- Keep this comment at the end of the file
91
114
Local variables:
92
115
mode: sgml
93
116