reference/ftp/functions/ftp-rename.xml
6ce59dacb46cddfc09b3a44f25632db264ab786a
...
...
@@ -51,7 +51,7 @@
51
51
&reftitle.returnvalues;
52
52
<para>
53
53
&return.success; Upon failure (such as attempting to rename a non-existent
54
-
file), an <literal>E_WARNING</literal> error will be emitted.
54
+
file), an <constant>E_WARNING</constant> error will be emitted.
55
55
</para>
56
56
</refsect1>
57
57

...
...
@@ -83,21 +83,22 @@
83
83
$old_file = 'somefile.txt.bak';
84
84
$new_file = 'somefile.txt';
85
85

86
-
// set up basic connection
86
+
// Set up basic connection
87
87
$ftp = ftp_connect($ftp_server);
88
88

89
-
// login with username and password
89
+
// Login with username and password
90
90
$login_result = ftp_login($ftp, $ftp_user_name, $ftp_user_pass);
91
91

92
-
// try to rename $old_file to $new_file
92
+
// Try to rename $old_file to $new_file
93
93
if (ftp_rename($ftp, $old_file, $new_file)) {
94
-
echo "successfully renamed $old_file to $new_file\n";
94
+
echo "Successfully renamed $old_file to $new_file\n";
95
95
} else {
96
-
echo "There was a problem while renaming $old_file to $new_file\n";
96
+
echo "There was a problem while renaming $old_file to $new_file\n";
97
97
}
98
98

99
-
// close the connection
99
+
// Close the connection
100
100
ftp_close($ftp);
101
+

101
102
?>
102
103
]]>
103
104
</programlisting>
104
105