I have a file in a directory name.processing and I want rename this file in name.processed
I have this code:
$fn1 = str_replace(".processed", ".processing", $fn);
rename($fn1,$fn);
$fn contain the complete path.
Why the file did not got rename in directory?
I think this is not a duplicate because i know how replace a part of string but i don't know how replace an extension of file in directory