rename
Rename a file or directory
rename()
function renames a file or directory.
If successful, the function returns true. If it fails, return false.
<?php rename ( "images" , "pictures" ) ; ?>
rename ( oldname , newname , context )
parameter | describe |
---|---|
oldname | Required. Specifies the file or directory to be renamed. |
newname | Required. Specify the new name of the file or directory. |
context | Optional. Specifies the environment for file handles. context is a set of options that can modify the behavior of a stream. |