rename
rename
(PHP 4, PHP 5, PHP 7)
rename — Renames a file or directory
Description
bool rename ( string $oldname , string $newname [, resource $context ] )
Attempts to rename oldname
to newname
, moving it between directories if necessary. If renaming a file and newname
exists, it will be overwritten. If renaming a directory and newname
exists, this function will emit a warning.