I want to change filename in directory carbrands/alto/alto.php
.Instead of alto.php
I want to change as alto_new.php
. But if I try to change name as
rename($old_name,$file_name);
After using this the filename changed but its not replace inside directory carbrands/alto
instead its replaced out of directory. How to fix this issue?
You need to mention the entire path.