The
rename() function of PHP
is equivalent to the ## in unix
#shellCommand
mv, it not only has a simple renaming function, but can also change the path of files or even entire directories.
1. Syntax:
rename(oldname,newname,context)
context is a set of options that can modify the behavior of the stream.
TRUE on success,
FALSE on failure.
2. Purpose:
##3. Example:
a. To rename the file:<?php
rename("aPS","BPS");
?>
to the file2 directory.
Both win32 and unix versions of php4
support this function. The win32 version of php4 has canceled the unlink()
function.
Recommended: "php video tutorial
" "php tutorial
"
The above is the detailed content of A wonderful encyclopedia of rename() in PHP. For more information, please follow other related articles on the PHP Chinese website!