Renaming Files in PHP
The function rename
allows you to rename
files. The first parameter is the old
file name, the second is the new file name:
<?php
rename('test.txt', 'new.txt');
?>
Let there be a file old.txt
in the root of your site.
Rename it to new.txt
.