rename function in php code example
Example 1: rename file php
rename('old_filename.txt', 'new_filename.txt');
Example 2: php move file
//Use the rename() function.
rename('first_location/image1.jpg', 'new_location/image1.jpg');
rename('old_filename.txt', 'new_filename.txt');
//Use the rename() function.
rename('first_location/image1.jpg', 'new_location/image1.jpg');