rename()

— Renames a file or directory

Description
bool rename ( string $oldname , string $newname [, resource $context ] )
Attempts to rename oldname to newname .

Example with rename()

rename(”/tmp/tmp_file.txt”, “/home/user/login/docs/my_file.txt”);

More example:

for ($i=1; $i<=26; $i++) {

$t=$i +0;
rename(”E:/dreamhost/free-patent-search/00/wheelchair/$t.htm”, “E:/dreamhost/free-patent-search/00/wheelchair/index$t.html”);
}

Posted in Php Code, Php Functions.

Leave a Reply

You must be logged in to post a comment.