PHP 8.1.12 Released!

Voting

: seven minus seven?
(Example: nine)

The Note You're Voting On

andrew at 21cv dot co dot uk
12 years ago
Code first, then explanation.

<?php

rename
("/folder/file.ext", "newfile.ext");

?>

That 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");

?>

<< Back to user notes page

To Top