reference/ftp/functions/ftp-chdir.xml
4d1c34c9b7a30cfc3a59641122c707a2812cfed7
...
...
@@ -9,7 +9,7 @@
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
11
<type>bool</type><methodname>ftp_chdir</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>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>
...
...
@@ -46,6 +44,24 @@
46
44
If changing directory fails, PHP will also throw a warning.
47
45
</para>
48
46
</refsect1>
47
+

48
+
<refsect1 role="changelog">
49
+
&reftitle.changelog;
50
+
<informaltable>
51
+
<tgroup cols="2">
52
+
<thead>
53
+
<row>
54
+
<entry>&Version;</entry>
55
+
<entry>&Description;</entry>
56
+
</row>
57
+
</thead>
58
+
<tbody>
59
+
&ftp.changelog.ftp-param;
60
+
</tbody>
61
+
</tgroup>
62
+
</informaltable>
63
+
</refsect1>
64
+
49
65
<refsect1 role="examples">
50
66
&reftitle.examples;
51
67
<para>
...
...
@@ -56,27 +72,27 @@
56
72
<?php
57
73

58
74
// set up basic connection
59
-
$conn_id = ftp_connect($ftp_server);
75
+
$ftp = ftp_connect($ftp_server);
60
76

61
77
// login with username and password
62
-
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
78
+
$login_result = ftp_login($ftp, $ftp_user_name, $ftp_user_pass);
63
79

64
80
// check connection
65
-
if ((!$conn_id) || (!$login_result)) {
81
+
if ((!$ftp) || (!$login_result)) {
66
82
die("FTP connection has failed !");
67
83
}
68
84

69
-
echo "Current directory: " . ftp_pwd($conn_id) . "\n";
85
+
echo "Current directory: " . ftp_pwd($ftp) . "\n";
70
86

71
87
// try to change the directory to somedir
72
-
if (ftp_chdir($conn_id, "somedir")) {
73
-
echo "Current directory is now: " . ftp_pwd($conn_id) . "\n";
88
+
if (ftp_chdir($ftp, "somedir")) {
89
+
echo "Current directory is now: " . ftp_pwd($ftp) . "\n";
74
90
} else {
75
91
echo "Couldn't change directory\n";
76
92
}
77
93

78
94
// close the connection
79
-
ftp_close($conn_id);
95
+
ftp_close($ftp);
80
96
?>
81
97
]]>
82
98
</programlisting>
...
...
@@ -93,7 +109,6 @@ ftp_close($conn_id);
93
109
</para>
94
110
</refsect1>
95
111
</refentry>
96
-

97
112
<!-- Keep this comment at the end of the file
98
113
Local variables:
99
114
mode: sgml
100
115