September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool rename(string old, string new)
Renames a file.
Returns:
TRUE on success; FALSE on failure
Description:
Renames a file from the old filename to the new filename. The user that PHP runs as must have sufficient permissions to rename the file.
Example:
$file_old = "oldfile";
$file_new = "newfile";
if(!rename($file_old, $file_new))
{
echo ("Rename failed");
}
|
Read now
Unlock full access