|
Posted by howa on 11/13/06 16:28
on windows, the rename() function will throw an error if target file
already exist, currently, i need to use, e.g.
function rename_win($oldfile, $newfile) {
if (!@ rename($oldfile, $newfile)) {
if (copy($oldfile, $newfile)) {
unlink($oldfile);
return TRUE;
}
return FALSE;
}
return TRUE;
}
but are there any better workaround?
thanks.
Navigation:
[Reply to this message]
|