Php Rename File

[Solved] Php Rename File | Perl - Code Explorer | yomemimo.com
Question : rename file php

Answered by : saptarshi-mondal

 rename('old_filename.txt', 'new_filename.txt');

Source : | Last Update : Thu, 21 May 20

Question : php rename files in directory

Answered by : geeky-bravo

<?php rename ("/folder/file.ext", "newfile.ext"); ?>
The above doesn't rename the file within the folder, as you might assume,
instead, it moves the file to whatever the PHP working directory is...
Chances are you'll not find it in your FTP tree.
Instead, use the following:
<?php rename ("/folder/file.ext", "/folder/newfile.ext"); ?>

Source : https://www.php.net/manual/en/function.rename.php | Last Update : Thu, 04 Feb 21

Answers related to php rename file

Code Explorer Popular Question For Perl