Menu Samaritan's Purse

RENAME

Renames a file or directory

SYNTAX

rename ( string $oldname , string $newname [, resource $context ] ) : bool

PARAMETERS

oldname

The old name.

Note: The wrapper used in oldname must match the wrapper used in newname.

newname

The new name.

context

Note: Context support was added with PHP 5.0.0. For a description of contexts, refer to Streams.

RETURN

Returns TRUE on success or FALSE on failure.

EXAMPLES


PHP