Q:

How to change a filename of a file which is in a folder in PHP

Can anyone tell how to change a filename of a file which is a located in a folder using PHP?
rename("http://localhost/DXXX/photos/".$photoNamepart, "http://localhost/DXXX/photos/".$phototmpNamepart);

Error:Message: rename() [function.rename]: http wrapper does not support renaming

A:

I guess the rename function could help.

A:

rename("/tmp/tmp_file.txt", "/tmp/my_file.txt");

